Hi devs,
In this tutorial, we will discuss how to run a specific seeder in Laravel. Here you will learn Laravel run specific seeder. This article goes in detail on Laravel call-specific seeder. let’s discuss Laravel run one seed.
Here, I will give you a simple example of how to run a specific seeder file in Laravel. you can easily use this example with Laravel 6, laravel 7, laravel 8, laravel 9, laravel 10 and laravel 11 versions.
you can use the following command to run specific seeder in Laravel application:
php artisan db:seed --class=AdminSeeder
Your seeder code is like this:
you can use following command to run all seeder in laravel application:
php artisan db:seed
you can use following command to run migrate with seeder in laravel application:
php artisan migrate:fresh --seed