Why we use laravel seed, if there is migration and eloquent that plays the role for database concept? -


i confused laravel seed concept. let me clear, in laravel there eloquent , migrations use crud operation database use in our controllers. in seed uses storing information in database table. why important instead of have 2 eloquent , migration database.

migrations nothing more laravel's way of maintaining database in friendly way. exporting , importing .sql files on every team member's computer everytime makes change database gets old , annoying fast. migrations make sure have type artisan migrate , you're date.

eloquent laravel's "object relational mapper" defines how app communicates database (in case model since laravel uses mvc architecture). models in laravel written in php , don't direct actions on database, act sort of facade makes easy stuff in database.

seeds little files let push in database, can test app. example, if need 3 different users different user roles, running command artisan db:seed lot faster making users manually in sql commands.

hope it's bit more clear you!


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -