pwweb / artomator

Artomator: Custom commands making life easier for Laravel.
MIT License
4 stars 1 forks source link

Create default routes for controllers #12

Closed frankpde closed 4 years ago

frankpde commented 5 years ago

It would be nice to have default CRUD routes automatically created for each controller (web and api). One way would be to create individual route files as per namespacing and have them included in the master web/api route file (i.e. append an include statement to the end of the file.

rabrowne85 commented 5 years ago

So I’ve been doing some research into this. I think the easiest solution would be for the command to generate the appropriate text and print to the console so it can be copied?

I’ll keep researching things and see what I can find.

frankpde commented 5 years ago

I'd prefer if you do not have to do any more manual copy/pasting...

rabrowne85 commented 4 years ago

I've added this to the feature/lg branch on the commit 5cf52fc83ea450b9d294a10827428d7a2f02e162. It generates a small .json file adjacent to the web file and then builds the routes from that. Turned out to be the easiest way forward.