[Laravel] The DELETE method is not supported for this route. Supported methods: GET, HEAD, POST.

florentyoon·2020년 12월 18일
0

Laravel

목록 보기
1/12

가끔 라우트에 제대로 태워서 값을 보냈다고 생각했는데, 에러가 뜰때가 있다.

        Route::delete('/{id}', 'AdminTestController@delete')->name('delete');

이렇게 delete라우트를 타서 AdminTestController 의 delete 메소드를 실행하란 의미인데,

' The DELETE method is not supported for this route. Supported methods: GET, HEAD, POST.'
에러가 발생한다.

분명 경로 상으론 문제가 없기 때문에 찾아보니 캐시 문제였다.

$ php artisan route:cache

이 명령어를 실행하면 라우트가 다시 제대로 잡힌다.

profile
florentyoon의 IT 세상

0개의 댓글