membuat halaman 404 di laravel 5

18:04 Unknown 0 Comments

pertama buka file app/Exception/Handler.php 
tambahkan use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;

dan function

public function render($request, Exception $e) { if($e instanceof NotFoundHttpException) { return response()->view('404', [], 404); } return parent::render($request, $e); }

0 comments: