[Laravel]リソースコントローラ備忘録

通常

Route::resource('post',PostController::class);

 
edit,updateを無効

Route::resource('post',PostController::class)->except(['edit','update']);

 
index,create,storeだけ有効

Route::resource('post',PostController::class)->only(['index','create','store']);