Replies: 1 comment 1 reply
-
See #231 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
For a while now, Freek from Spatie has been pushing for using
Most recently in this Laracasts episode.
While I don't necessarily agree that this should be the default for every Laravel project (because sometimes you don't use Resource Routes, but want to take the user to a certain method in that controller), I do like how it would fit Backpack projects for routing to CRUDs. Since CRUD routes are resource routes, you only need to point to the controller, not a certain method inside it.
So what I propose is that we:
(1) Add support for this syntax:
(without removing the old one, of course)
(2) Maybe make this one the default? The one that's generated by our packages.
Thoughts anyone?
PS. This would mean that we don't use the "namespace" feature in the route group. So yes, you'll have the
/App/Http/Controllers/Admin
namespace littered all across theroutes/backpack/custom.php
file. Basically for every CRUD route. But it would have the benefit of being able to click the controller to go to it. And easy refactoring using IDEs. There's always a catch 😄 Not 100% it's worth it in this case. Looking for feedback.Beta Was this translation helpful? Give feedback.
All reactions