Configure Controller Suffix #21
                  
                    
                      secondmanveran
                    
                  
                
                  started this conversation in
                Ideas
              
            Replies: 0 comments
  
    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.
Uh oh!
There was an error while loading. Please reload this page.
-
In the current implementation, in order to be discovered controllers must end in
Controller.phpHaving worked with this framework for the better part of 6 years, it's pretty clear that most developers use less than conventional default structures for their applications.
For instance for medium sized apps that doesn't need full domain abstraction, I'll still modularize controllers in sub directories.
In the current release, even when properly registered for discovery:
these controllers will not be registered since they don't end in
Controller.phpI would suggest adding a suffix method that can register controllers with a different or no suffix at all, as seen above.
Would match the controllers listed above that have no suffix.
Would allow these
Actionstyle controllers:Or perhaps you want an
Actionsdir and no suffix, ADR style:And of course the fallback would be to leave off the
->suffix()chained function to keep the defaultControllers.phpsuffix.I would be happy to submit a PR for this but I don't see exactly where this would go.
Beta Was this translation helpful? Give feedback.
All reactions