create a function to auto seed datas to database in laravel code example Example: how to make db seeder in laravel php artisan make:seeder UsersTableSeeder