PHP code example of district5 / slim-s4s
1. Go to this page and download the library: Download district5/slim-s4s 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/ */
district5 / slim-s4s example snippets
\S4S\Slim4\Factory\AppFactory::setEnvironment(\S4S\Slim4\Enum\Environment::\S4S\Slim4\Enum\Development);
$base = __DIR__ . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR;
$app = AppFactory::createJsonApi($base . 'api');
$app->run();
$base = __DIR__ . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR;
$app = AppFactory::createUI($base . 'www');
$app->run();