How to create different view for different exception laravel 5? -


i want set different view blade template different exception , pass errors on following page. tried out following code it's not working. goes else portion of code , run parent::render($request, $e);code.

public function render($request, exception $e) {     if ($this->ishttpexception($e))     {         if($e instanceof invalidargumentexception)         {             return response()->view('front.missing', [], 404);         }elseif($e instanceof errorexception){             return response()->view('front.missing2', [], 404);         }         return $this->renderhttpexception($e);     }else{         if($e instanceof invalidargumentexception)         {             return response()->view('errors.204', []);         }          return parent::render($request, $e);     }  } 

where problem here , now?

invalidargumentexception not child class of httpexception, goes else portion.


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -