7 months ago

Naming Routes

Posted 7 months ago by DesignDepotNL

I've extended the task app Jeffrey builds in the Laravel from Scratch series. I've added a delete button after the task so the user is able to delete the tasks as well. All works fine, no problem here, however, i named my route:

Route::delete('/tasks/{task}/delete', '[email protected]');

I was wondering of it is good practice to name your routes after the methods or should i be avoiding this? And if so, for what reason?

Note: The user will not see the delete URI mostly since i return back() in my [email protected] method.

Please sign in or create an account to participate in this conversation.