Laravel 5.5 Seeding Example | Laravel Seeding | Laravel Database: Seeding

Seeding is very useful while you wanted to keep some dummy data without manual interfere with Database. For example when you deploy you application you insert admin credentials into you users table every time you deploy so that admin user can login. You don't need to to insert those credentials manually every time.
Laravel provides feature of seeding and you can manage your dummy database in your seed classes.



You can create seed like below artisan command:

These command will create a new file 'database/seeds/ProductsTableSeeder.php' and 'database/seeds/UsersTableSeeder.php' which will contain a run() method. ...  Read More

Share This: