Skip to content
This repository was archived by the owner on Mar 28, 2026. It is now read-only.

Commit 6e65c65

Browse files
committed
Fix readme issues.
1 parent c0dac70 commit 6e65c65

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,14 +421,17 @@ use App\Models\Posts;
421421
factory(Posts::class, 'withUser', 20)->create();
422422
```
423423

424-
#### Creating Database Seeders
424+
#### Database Seeding
425+
Database seeding gives you the ability to fill your database with testing data in a matter of seconds.
426+
427+
##### Creating Database Seeders
425428
To create an empty database seeder file, use the `make:seeder` command:
426429
```
427430
php yarak make:seeder SeederName
428431
```
429432
This will generate an empty seeder file in /database/seeds. It is recommended to create separate seeder files for individual database tables.
430433

431-
#### Writing Database Seeders
434+
##### Writing Database Seeders
432435
All database seeders must have a `run` method where the database seeding logic is defined. In the run method, do whatever is necessary to fill the database table. Using [model factories](#model-factories) makes this process simple to acheive. An example seeder for a users tables might look like this:
433436
```php
434437
use App\Models\Users;
@@ -492,7 +495,7 @@ class DatabaseSeeder extends Seeder
492495
```
493496
This will run each seeder file in the order they are listed. First, we will create five users with the UsersTableSeeder, then for each of those users, we will create five posts with the PostsTableSeeder.
494497

495-
#### Using Database Seeders
498+
##### Using Database Seeders
496499
To run database seeder files, use the `db:seed` command:
497500
```
498501
php yarak db:seed SeederName

0 commit comments

Comments
 (0)