Suppose i want to return 404 error view from my controller's method and i have this block of code.
try {
file_get_contents('http://www.somewebsite.com');
}
catch (\Exception $e) {
return view('errors.404'); // View::make('errors.404');
// or
return response()->view('errors.404'); // Response::view('errors.404');
// or
abort(404); // App::abort(404);
}
Each time i'll see the same view output of 404. Here is my questions.
What is the difference among view(), response()->view() and abort()?
What is the particular use cases of them?