1. Go to this page and download the library: Download psykosoldi3r/slim-doctrine 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/ */
psykosoldi3r / slim-doctrine example snippets
$doctrine = new \Slim\Middleware\Doctrine( \Slim\Container $container, array $configuration );
namespace App\Controllers;
use Interop\Container\ContainerInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Slim\Middleware\DoctrineResource;
class QuestionController extends DoctrineResource
{
public function __construct( ContainerInterface $ci ){
parent::__construct( $ci );
}
public function exampleAction( ServerRequestInterface $request, ResponseInterface $response, $args ){
$em = $this->getEntityManager();
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.