Converts DB schema to Laravel code (Migrations & Models)
abdelrahmanrafaat/schema-to-code is a Laravel package for converts db schema to laravel code (migrations & models).
It currently has 20 GitHub stars and 13 downloads on Packagist.
Install it with composer require abdelrahmanrafaat/schema-to-code.
Discover more Laravel packages by abdelrahmanrafaat
or browse all Laravel packages to compare alternatives.
Last updated
Laravel Packages for Converting Relational Database schema with a predefined syntax To code (Models & Migrations)
$ composer require abdelrahmanrafaat/schema-to-code:dev-master
$ touch app/schema.txt
user:profile
actor:movie
cart:product1:1
1:m
m:1
m:m user : profile
1 : 1
user : order
1 : m
Or like this :
order : user
m : 1
cart : product
m : m
Or like this :
cart : product
m : m
User:Profile
1:1
User:Actor
1:1
Actor:Movie
M:m
Movie:Review
1:M
Review:User
M:1
$ php artisan conver:schema-to-code app/schema.txt
| Created Migrations ... | | -------------------------- | | create_users_table | | create_profiles_table | | create_actors_table | | create_movies_table | | create_reviews_table | | update_profiles_relations | | update_actors_relations | | create_actors_movies_table | | update_reviews_relations |
| Created Models ... | | ------------------ | | User | | Profile | | Actor | | Movie | | Review |
$ php artisan migrate
Happy Coding ^_^