How to Run Specific...

How to Run Specific Seeder in Laravel?

Published: May 11, 2024

Last Updated: October 07, 2024

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:

How to make seeder file in laravel

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

Avatar of shahidul

Author

Hire Me
Md Shahidul Islam
Full-Stack Software Developer
As a full-stack developer, I've been working for over 5 years. I am from Bangladesh and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Laravel, WordPress, Vue, Javascript, Tailwind CSS and Bootstrap from the early stage. I believe in Hardworking and Consistency.

Follow me:

Recent Blogs

Maybe you will benefit to know

Why SEO is very important for your website?
Why SEO is very important for your website?
Read More
The Importance of a Portfolio Website
The Importance of a Portfolio Website
Read More
The Benefits and Uses of a Queue Management System to any business
The Benefits and Uses of a Queue Management System to any business
Read More