chatbox-inc / lumen-providers
There is no license information available for the latest version (dev-master) of this package.
This package's canonical repository appears to be gone and the package has been frozen as a result.
dev-master
2016-09-30 06:51 UTC
Requires (Dev)
- laravel/lumen: ^5.2
This package is auto-updated.
Last update: 2019-02-13 06:38:29 UTC
README
ArtisanServiceProvider
$app->register(\Chatbox\Lumen\ArtisanServiceProvider::class);
$app->extend(\Illuminate\Contracts\Console\Kernel::class,function($console){
$console->addCommands([
// your commands here
]);
});
\Chatbox\Lumen\Exceptions\Handler
$app->singleton(\Illuminate\Contracts\Debug\ExceptionHandler::class,function(){
$handler = new \Chatbox\Lumen\Exceptions\Handler();
// set your Reporters;
return $handler;
});
Rest API
Middleware を追加するだけでOK。指定されたルート下でReponse型の規定と、エラー整形を行ってくれる。
Log Handler
@deprecated see laravel-logger
$app->extend(\Psr\Log\LoggerInterface::class,function(\Monolog\Logger $logger){
$handler = new \Chatbox\Lumen\Logger\Handlers\StdoutHandler(\Monolog\Logger::DEBUG);
$logger->pushHandler($handler);
return $logger;
});