Open
Description
Laravel 9 introduced Route::controller
groups (may have been back ported to Laravel 8). This task would refactor routes to use the new Route::controller()
groupings.
Before
Route::get('/photos', [PhotoController::class, 'index'])->name('photos.index');
Route::get('/photos/{id}', [PhotoController::class, 'show'])->name('photos.show');
After
Route::controller(PhotoController::class)->group(function () {
Route::get('/photos', 'index')->name('photos.index');
Route::get('/photos/{id}', 'show')->name('photos.show');
});