public function composeError($view, array $data = [], int $status = 404): Response
    {
        $engine = $this->view;
        $file = "errors.{$status}";
        $view = $engine->exists($file) ? $engine->make($file, $data) : "{$status} Error";

        return new Response($view, $status);
    }
public function composeError($view, array $data = [], int $status = 404): Response
    {
        $engine = $this->view;
        $file = "errors.{$status}";
        $view = $engine->exists($file) ? $engine->make($file, $data) : "{$status} Error";

        return new Response($view, $status);
    }
public function composeError ( $ view , array $ data = [ ] , int $ status = 404 ) : Response { $ engine = $ this -> view ; $ file = "errors.{$status}" ; $ view = $ engine -> exists ( $ file ) ? $ engine -> make ( $ file , $ data ) : "{$status} Error" ; return new Response ( $ view , $ status ) ; }
Compose an error template.

@param  mixed  $view
@param  array  $data
@param  int  $status

@return \Illuminate\Http\Response
Compose an error template .