How do I catch exceptions / missing pages in Laravel 5?

前端 未结 8 1581
小鲜肉
小鲜肉 2020-11-27 13:11

In Laravel 5, App::missing and App::error is not available, so how do your catch exceptions and missing pages now?

I could not find any inf

8条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-27 13:58

    In case you want to keep the handler in your web routes file, after your existing routes:

    Route::any( '{all}', function ( $missingRoute) {
        // $missingRoute
    } )->where('all', '(.*)');
    

提交回复
热议问题