i made simple resume site with laravel 5.4 and i wanna if users type anything except my site name and my site.com/panel automatically redirect to 404 page.
how can i do that?
is there any route to do that or what?
i found this code but not use
public function render($request, Exception $e)
{
if ($e instanceof
\Symfony\Component\HttpKernel\Exception\NotFoundHttpException){
return response(redirect(url('/')), 404);
}
return parent::render($request, $e);
}