=> "When declaring a resource route, you may specify a subset
of actions the controller should handle instead of the full
set of default actions: "
use App\Http\Controllers\PhotoController;
Route::resource('photos', PhotoController::class)->only(['index', 'show']);
Route::resource('photos', PhotoController::class)->except([
'create', 'store', 'update', 'destroy'
]);
No comments:
Post a Comment