Advertisement
Guest User

Untitled

a guest
Oct 10th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.76 KB | None | 0 0
  1. public function render($request, Exception $exception)
  2. {
  3.     return parent::render($request, $exception);
  4. }
  5.  
  6.  
  7. ################################################################
  8. ################# Ganti dengan ini #############################
  9. ################################################################
  10.  
  11.  
  12. public function render($request, Exception $e)
  13. {  
  14.     if($this->isHttpException($e))
  15.     {
  16.         switch (intval($e->getStatusCode())) {
  17.             // not found
  18.             case 404:
  19.                 return redirect()->route('home');
  20.                 break;
  21.  
  22.             default:
  23.                 return $this->renderHttpException($e);
  24.                 break;
  25.         }
  26.     }
  27.     else
  28.     {
  29.         return parent::render($request, $e);
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement