Today I come across a use case where I need to minimise writing route('resources.index)` and so on, all related to resourceful routes. Can it be more simpler if based on given model, I can simply get the model's resourceful URL without think much what's the name of the resourceful route? What I mean, I don't want to remember anything about given model, what's its route names.

For instance, if given model is \App\Models\User, it's URI always in lower case, plural and kebab case - http://domain.com/users for users.index, http://domain/users/1 for users.show.

Yes, but work smart - create a base model that later on, all models extend from the base class.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners