First you open app/start/global.php file
find below function :-
App::error(function(Exception $exception, $code)
{
Log::error($exception);
And last set following condition :-
if ( ! in_array($code,array(401,403,404,500))){
return;
}
$data = array('code'=> $code);
switch ($code) {
case 401:
return Response::view('errors.err401', $data, $code); ///set path of app/views/errors/err401.blade.php
break;
case 402:
return Response::view('errors.err402', $data, $code);
break;
case 403:
return Response::view('errors.err403', $data, $code);
break;
case 404:
return Response::view('errors.err404', $data, $code);
break;
}
});
find below function :-
App::error(function(Exception $exception, $code)
{
Log::error($exception);
And last set following condition :-
if ( ! in_array($code,array(401,403,404,500))){
return;
}
$data = array('code'=> $code);
switch ($code) {
case 401:
return Response::view('errors.err401', $data, $code); ///set path of app/views/errors/err401.blade.php
break;
case 402:
return Response::view('errors.err402', $data, $code);
break;
case 403:
return Response::view('errors.err403', $data, $code);
break;
case 404:
return Response::view('errors.err404', $data, $code);
break;
}
});
No comments:
Post a Comment