[Vuejs]-Laravel API route โ€“ exception: "Symfony\Component\HttpKernel\Exception\NotFoundHttpException"

0๐Ÿ‘

Run php artisan route:list and check if route like '/deleteComment/{routeCommentID}' exists and whether you use that route in your Vue application.

-2๐Ÿ‘

for deleting a post itโ€™s better to use

Route::delete('/deleteComment/{id}', 'CommentController@delete');

and checkout your blade for deletion
it should be something like below

<form action={{ 'wanted route' }} method="post">
@csrf
@method('delete')
    // your code
</form>

Leave a comment