exceptionHandling
//Handler.php
public function render($request, Exception $e){
if(app()->environment('production')){
if($e instanceof \Illuminate\Database\Eloquent\ModelNotFoundException){
return response(view('errors.notice',[
'title'=>'์ฐพ์ ์ ์์ต๋๋ค.',
'description' => '์ฃ์กํฉ๋๋ค! ์์ฒญํ์ ํ์ด์ง๊ฐ ์์ต๋๋ค.'
]), 404);
}
}
return parent::render($request, $e);
}Last updated