1. Go to this page and download the library: Download appaydin/pd-api library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
# src/Controller/AuthorizationController.php
namespace App\Controller;
use Pd\ApiBundle\Controller\AbstractApiController;
use Pd\ApiBundle\Controller\LoginTrait;
class AuthorizationController extends AbstractApiController
{
use LoginTrait;
}
# src/Controller/ExampleApiController.php
use Pd\ApiBundle\Controller\AbstractApiController;
use Symfony\Component\Routing\Annotation\Route;
class ExampleApiController extends AbstractApiController
{
#[Route("/home", name:"api.home", methods: ["GET"])]
public function home() {
return ['test'];
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.