1. Go to this page and download the library: Download geggleto/slimgateway 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/ */
geggleto / slimgateway example snippets
$container['users.gateway'] = function ($c) {
return new TableGateway('user', $c['adapter']);
};
$container['user.controller'] = function ($c) {
return new EntityController($c['users.gateway']);
};
$container['user.fetch.validator'] = function ($c) {
/** @var $request \Slim\Http\Request */
$request = $c['request'];
$validator = new \Valitron\Validator($request->getParsedBody());
$validator->rule('n\Validator($request->getParsedBody());
$validator->rule('tp\Request */
$request = $c['request'];
$validator = new \Valitron\Validator($request->getParsedBody());
$validator->rule('tionMiddleware($validator);
};