marcoazn89 / slim-booboo
Booboo's integration for Slim3.0 framework
Installs: 9 465
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=5.3.0
- marcoazn89/booboo: ^2.0
This package is not auto-updated.
Last update: 2025-05-10 21:08:39 UTC
README
BooBoo
's integration for Slim3.0 framework
Install via Composer
composer require marcoazn89/slim-booboo:dev-master
Set up
$app->add(new \SlimBooboo\Middleware());
Overwrite default templates
// configArray overwrites the default error templates. Example: $configArray= [ 'html' => 'some/folder/html.php', 'json' => 'some/folder/json.php' ]; $app->add(new \SlimBooboo\Middleware($configArray));
Example
require '../vendor/autoload.php'; $app = new \Slim\App(); $app->add(new \SlimBooboo\Middleware()); $app->get('/exception/', function($req, $res, $arg) { throw new Exception("Error Processing Request", 1); }); $app->get('/error/', function($req, $res, $arg) { $a->B(); }); $app->run();