基本
基本は下記ページを参考。
注意
app\Exceptions\Kernel.php は下記のように修正する。
<?php // 中略 class Handler extends ExceptionHandler { // 中略 // 追加 or 修正部分 public function report(Throwable $exception) { parent::report($exception); } public function shouldReport(Throwable $exception) { return parent::shouldReport($exception); } public function render($request, Throwable $exception) { return parent::render($request, $exception); } public function renderForConsole($output, Throwable $exception) { parent::renderForConsole($output, $exception); } // ここまで }
- return 忘れに注意
- shouldntReportという紛らわしいメソッドにも注意