public function bootstrap($autoloader = null) { parent::bootstrap($autoloader); $this->on('app.init', function ($application) { Record::setDb($application->services['database']); }); }
<?php require_once __DIR__ . '/../vendor/autoload.php'; use Popcorn\Pop; $pop = new Pop(); $pop->get('/', ['controller' => 'Skeleton\\Controller\\IndexController', 'action' => 'index']); $pop->get('/hello[/:name]', ['controller' => 'Skeleton\\Controller\\IndexController', 'action' => 'hello']); $pop->get('*', ['controller' => 'Skeleton\\Controller\\IndexController', 'action' => 'error']); $pop->run();