Create custom exception in Laravel 5.2

94 views
Skip to first unread message

Setyo Agung Nugroho

unread,
Jan 18, 2016, 1:06:39 AM1/18/16
to Laravel
How to create custom exception specially QueryException in Laravel 5.2

Setyo Agung Nugroho

unread,
Jan 18, 2016, 1:35:12 AM1/18/16
to Laravel
OK, I got it.

i add this code to render function in Handler.php
 if ($e instanceof QueryException) {
        return response()->view('errors.custom');
 }
Reply all
Reply to author
Forward
0 new messages