Sunday, November 19, 2017

Laravel - Create models from database

If you are using MySQL and Laravel 5.1 or above you can use php artisan code:models from this package: reliese/laravel. All you need to do is:
1.      composer require reliese/laravel
2.      Add the service provider to your config/app.php file Reliese\Coders\CodersServiceProvider::class
3.      Publish the config file with php artisan vendor:publish --tag=reliese-models
4.      Make sure your database is correctly configured in config/database.php and .env files.
And finally issue the command: php artisan code:models

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.