2022年3月30日解決済み

delete メソッドでなぜ /comments/{comment} から始まっているのかわかりません

ユーザー
Route::post('/posts/{post}/comments', [CommentController::class, 'store'])
    ->name('comments.store')
    ->where('post', '[0-9]+');

Route::delete('/comments/{comment}/destroy', [CommentController::class, 'destroy'])
    ->name('comments.destroy')
    ->where('comment', '[0-9]+');

上記の delete メソッドでなぜ /comments/{comment} から始まっているのか色々と理解が混乱してしまって整理できていません。なぜこうなるのか教えていただけますでしょうか?

スタッフ

この回答を見るにはプレミアムプランへの登録が必要です

プレミアムプランとは?