geeksltd/pangolin.symfony

There is no license information available for the latest version (2.24) of this package.

api for pangolin

Installs: 1 520

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:symfony-bundle

2.24 2023-02-13 10:45 UTC

README

Tutorial on how to install apcu on windows machine

Make sure to install these packages first

composer req annotation api

Install the package through composer

composer require geeksltd/pangolin.symfony --dev

Enable pangolin bundle in your config/bundles.php file

Simply add this PangolinBundle class to the array as bellow.Pangolin bundle only is available on dev and test environment.

// config/bundles.php
return [
    Geeks\Pangolin\PangolinBundle::class => ['dev' => true, 'test' => true],
];

This Project contains controllers and routes. you must enable pangolin routes in your main routes.yaml file

# config/routes.yaml
pangolin_bundle:
    resource: '@PangolinBundle/Resources/config/routes.yaml'

Enable Debug menu in your symfony application

 {% include '@Pangolin/debug/debug.html.twig' %}

-----------------------------------------------------------

! Important note : Make sure to create a database that ends with .temp . it is a must in this package.Otherwise, following api won't work

-----------------------------------------------------------

Available apis

1 )GET /cmd/db-restart

This api drops and recreates the current the database and runs all migrations and fixtures.

Response Examples :

{
  "message": "All operations successfully completed",
  "status": true
}

Or

{
  "message": "Database name does not contain .temp suffix",
  "status": false
}

-----------------------------------------------------------

2 )GET /cmd/get-db-changes

Get the latest executed sql queries. all the queries will be wiped out once the api is called

Response Examples :

{
  "data": [
    {
      "log": "INSERT INTO product (title, code, type) VALUES ('product_name', 'code1', 'car')"
    },
    {
      "log": "INSERT INTO user (title) VALUES ('ranger')"
    }
  ]
}

Or

{
  "data": null
}

-----------------------------------------------------------

3 )POST /cmd/db-run-changes

This api expects the previous json response above as a json request and runs all the queries. Make sure to add Content-Type : application/json in your header.

Response Examples :

{
"message": "All queries have been executed successfully",
"status": true
}

-----------------------------------------------------------

4 )GET /cmd/outbox

This route displays a list of available mails in the database based on interface implemented by an entity

-----------------------------------------------------------

5 )GET /cmd/local-date?date=2/2/2021&time=20:20:20

This api expects a get request

Response Examples :

{
  "message": "Local time has been updated.",
  "status": true,
  "data": "2/2/2021 20:20:20"
}

-----------------------------------------------------------