laravel customizing missing model behavior

Solutions on MaxInterview for laravel customizing missing model behavior by the best coders in the world

showing results for - "laravel customizing missing model behavior"
Shane
11 Nov 2020
1use App\Http\Controllers\LocationsController;
2use Illuminate\Http\Request;
3use Illuminate\Support\Facades\Redirect;
4
5Route::get('/locations/{location:slug}', [LocationsController::class, 'show'])
6        ->name('locations.view')
7        ->missing(function (Request $request) {
8            return Redirect::route('locations.index');
9        });
similar questions
queries leading to this page
laravel customizing missing model behavior