Skip to content

Commit 3f7dd37

Browse files
authored
Merge pull request #5920 from winter-ice/7.x
[7.x] Consistent filename
2 parents 32740a1 + 8f3009a commit 3f7dd37

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

seeding.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
<a name="introduction"></a>
1010
## Introduction
1111

12-
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 `UsersTableSeeder`, 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.
12+
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.
1313

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

1717
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:
1818

19-
php artisan make:seeder UsersTableSeeder
19+
php artisan make:seeder UserSeeder
2020

2121
A seeder class only contains one method by default: `run`. This method is called when the `db:seed` [Artisan command](/docs/{{version}}/artisan) is executed. Within the `run` method, you may insert data into your database however you wish. You may use the [query builder](/docs/{{version}}/queries) to manually insert data or you may use [Eloquent model factories](/docs/{{version}}/database-testing#writing-factories).
2222

@@ -82,9 +82,9 @@ Within the `DatabaseSeeder` class, you may use the `call` method to execute addi
8282
public function run()
8383
{
8484
$this->call([
85-
UsersTableSeeder::class,
86-
PostsTableSeeder::class,
87-
CommentsTableSeeder::class,
85+
UserSeeder::class,
86+
PostSeeder::class,
87+
CommentSeeder::class,
8888
]);
8989
}
9090

@@ -99,7 +99,7 @@ Now you may use the `db:seed` Artisan command to seed your database. By default,
9999

100100
php artisan db:seed
101101

102-
php artisan db:seed --class=UsersTableSeeder
102+
php artisan db:seed --class=UserSeeder
103103

104104
You may also seed your database using the `migrate:fresh` command, which will drop all tables and re-run all of your migrations. This command is useful for completely re-building your database:
105105

0 commit comments

Comments
 (0)