Answers for "render vs redirect laravel exception"

PHP
1

laravel response redirect

#Method 1 with route name
return redirect()->route('login');

#Method 2 back with input
return back()->withInput();

#Method 2 using a url
return redirect('/home/dashboard');
Posted by: Guest on August-25-2021
1

render vs redirect laravel exception

report() is used if you want to do some additional logging – send error to BugSnag, email, Slack etc.
render() is used if you want to redirect back with error or return HTTP response (like your own Blade file) directly from Exception class
Posted by: Guest on February-21-2022

Browse Popular Code Answers by Language