PHP code example of nalgoo / app
1. Go to this page and download the library: Download nalgoo/app 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/ */
nalgoo / app example snippets
use DI\ContainerBuilder;
use Nalgoo\App;
use Nalgoo\App\Builder;
// optional, highly recommended
Builder::setDefaults();
$containerBuilder = new ContainerBuilder();
$containerBuilder->addDefinitions(Builder::getDefinitions());
$container = $containerBuilder->build();
$app = $container->get(App::class);
$app->register($routes);
$app->register($middleware); // should be before registerCoreMiddleware()
$app->registerCoreMiddleware();
$app->run();