app/Http/Controllers/BaseController.php
//function to show error page with custom message and type of error page we want to load
function to show error page with custom message and type of error page we want to load
function to show error page with custom message and type of error page we want to load
protected function showErrorPage($errorCode = 404, $message = null)
{
    $data['message'] = $message;
    return response()->view('errors.'.$errorCode, $data, $errorCode);
}
protected function showErrorPage ( $ errorCode = 404 , $ message = null ) { $ data [ 'message' ] = $ message ; return response ( ) -> view ( 'errors.' . $ errorCode , $ data , $ errorCode ) ; }
function to show error page with custom message and type of error page we want to load
function to show error page with custom message and type of error page we want to load
//loading error view from errors folder based on error type, default=404 and passing custom message to it using the data property