1 year ago

Run migrations that are scattered in different folders

Posted 1 year ago by Wuanshu

Hi guys, Laravel is really helpful for my REST API project but something was bothering me since the beginning: The directory structure. Today I chose to drop it altogether for my preferred structure based on features. Each model has its own folder with all the files that are related to it. So for the User folder I have a model file, a route file, the migrations, the tests, etc. But I am running into a pickle here. I don't know how I should run my migrations and seeding. The easy answer would be to keep everything in the database folder but it would defeat the purpose of my approach. Should I use a Service Provider? Any help would be greatly appreciated.

Please sign in or create an account to participate in this conversation.