Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

eggplantSword's avatar

What to do with unused crud methods in controller

I have a couple controllers that don't use all the resource methods, for example the way I do my cruds I only use one vue file and the index, store, update, and destroy methods in the controller. What should I do with the other ones (create, edit, show) should I remove the entire method or just put a redirect in it in case someone gets curious with the routes?

What do you recommend?

0 likes
3 replies
automica's avatar

@msslgomez just delete the ones you don't need. if you don't need all the routes, don't use Route::resource() and just define the routes you need.

Please or to participate in this conversation.