Skip to content

Commit

Permalink
Updated new database/seeders directory name
Browse files Browse the repository at this point in the history
  • Loading branch information
chimit authored Sep 9, 2020
1 parent 0065ddd commit 1d13a3b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions seeding.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
<a name="introduction"></a>
## Introduction

Laravel includes a simple method of seeding your database with test data using seed classes. All seed classes are stored in the `database/seeds` directory. Seed classes may have any name you wish, but probably should follow some sensible convention, such as `UserSeeder`, etc. By default, a `DatabaseSeeder` class is defined for you. From this class, you may use the `call` method to run other seed classes, allowing you to control the seeding order.
Laravel includes a simple method of seeding your database with test data using seed classes. All seed classes are stored in the `database/seeders` directory. Seed classes may have any name you wish, but probably should follow some sensible convention, such as `UserSeeder`, etc. By default, a `DatabaseSeeder` class is defined for you. From this class, you may use the `call` method to run other seed classes, allowing you to control the seeding order.

<a name="writing-seeders"></a>
## Writing Seeders

To generate a seeder, execute the `make:seeder` [Artisan command](/docs/{{version}}/artisan). All seeders generated by the framework will be placed in the `database/seeds` directory:
To generate a seeder, execute the `make:seeder` [Artisan command](/docs/{{version}}/artisan). All seeders generated by the framework will be placed in the `database/seeders` directory:

php artisan make:seeder UserSeeder

Expand All @@ -36,7 +36,7 @@ As an example, let's modify the default `DatabaseSeeder` class and add a databas
class DatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
* Run the database seeders.
*
* @return void
*/
Expand All @@ -62,7 +62,7 @@ For example, let's create 50 users and attach a relationship to each user:
use App\Models\User;

/**
* Run the database seeds.
* Run the database seeders.
*
* @return void
*/
Expand All @@ -80,7 +80,7 @@ For example, let's create 50 users and attach a relationship to each user:
Within the `DatabaseSeeder` class, you may use the `call` method to execute additional seed classes. Using the `call` method allows you to break up your database seeding into multiple files so that no single seeder class becomes overwhelmingly large. Pass the name of the seeder class you wish to run:

/**
* Run the database seeds.
* Run the database seeders.
*
* @return void
*/
Expand Down

0 comments on commit 1d13a3b

Please sign in to comment.