Route::fallback(function ()
{
return redirect()->to('/');
});
/app/Exceptions/Handler.php
/**
* Render an exception into a response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $e
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $e)
{
if ($e instanceof NotFoundHttpException) {
return redirect()->to('/');
}
return parent::render($request, $e);
}