I wanted to use the abort function but it is not working. Here is the code i am using. I am currently run this code on Laravel 5.2
Route::get('/test',function(){
abort(403);
});
It generates the following error
HttpException in Application.php line 905:
I wanted to ask this function is still available or what i am doing wrong.
It's expected behavior to show exception screen for abort calls from ~4.x: https://github.com/laravel/framework/issues/912
use response with status code:
Route::get('/test',function(){
return response(null, 403);
});
with abort:

with response(null, 403):

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With