laravel
laravel copied to clipboard
Creating model folders based on the tables prefixes
Example, I have tables in one database:
gallery_marks
gallery_models
gallery_modifications
gallery_cars
news_categories
news_posts
news_other_tables
images
Now the package will create all models in the folder 'path' => app_path('Models'),
It will be fine if you can set the prefixes of the tables in the configuration to generate the models in the subfolders.
Example:
'tables_prefixes' => [
'gallery', 'news'
],
And when the command was run, the models in the folder path
would be created:
Gallery/Mark::class
Gallery/Model::class
Gallery/Modification::class
Gallery/Car::class
News/Category::class
News/Post::class
News/OtherTable::class
Images::class
// And based models:
Base/Gallery/Mark::class
Base/Gallery/Model::class
Base/Gallery/Modification::class
Base/Gallery/Car::class
Base/News/Category::class
Base/News/Post::class
Base/News/OtherTable::class
Base/Images::class
It would be cool 🙂
Sounds really cool!
love it
Let's work ?