This is my first time using Slim and have a question. In looking at your config, would you suggest putting the Actions within another directory for example
app
src
Actions
User
CreateAction.php
UpdateAction.php
DeleteAction.php
Post
CreateAction.php
or do you have a different suggestion.
Here is how I currently have my project structure
app
src
Actions
BaseAction.php
Users
AllActions.php
CreateAction.php
ReadAction.php
UpdateAction.php
DeleteAction.php
Posts
AllActions.php
CreateAction.php
etc....
Models
User.php
Post.php
I find this structure will keep my actions contained and small. AllActions is the final class which extends the baseclass. I use traits for CRUD and use them in the Class.
The nice thing about Slim is that it doesn't enforce any particular structure. I like to split out my actions into subfolders for larger apps, for but smaller ones I don't bother.
This is my first time using Slim and have a question. In looking at your config, would you suggest putting the Actions within another directory for example
or do you have a different suggestion.
Here is how I currently have my project structure
I find this structure will keep my actions contained and small. AllActions is the final class which extends the baseclass. I use traits for CRUD and
use
them in the Class.