Laravel 9 provides shorter version of response()->route()
, take a look on the following code:
1// Old way2Route::get('redirectRoute', function() {3 return redirect()->route('home');4});5 6// Post Laravel 97Route::get('redirectRoute', function() {8 return to_route('home');9});
This helper work in the same way as redirect()->route('home')
, but it is more concise than a old way.
Tip given by @CatS0up