Changeset 4b7e2d3 for database/seeders/FoldersTableSeeder.php
- Timestamp:
- 10/23/21 04:03:46 (3 years ago)
- Branches:
- develop, master
- Children:
- b39afb5
- Parents:
- c6b84df
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
database/seeders/FoldersTableSeeder.php
rc6b84df r4b7e2d3 3 3 namespace Database\Seeders; 4 4 5 use App\Models\Department; 5 6 use App\Models\Folder; 6 7 use Carbon\Carbon; … … 16 17 public function run() 17 18 { 18 Folder::factory()->count(300)->create(); 19 Folder::factory()->count(500)->create(); 20 $folders = Folder::all(); 21 22 foreach ($folders as $folder) { 23 $folder->department()->increment('no_of_folders'); 24 } 19 25 } 20 26 }
Note:
See TracChangeset
for help on using the changeset viewer.