run factory in seed code example
Example 1: laravel 8 seeding
php artisan db:seed
php artisan db:seed --class=UserSeeder
Example 2: how to make db seeder in laravel
php artisan make:seeder UsersTableSeeder
php artisan db:seed
php artisan db:seed --class=UserSeeder
php artisan make:seeder UsersTableSeeder