source: database/seeders/FoldersTableSeeder.php@ e78295c

Last change on this file since e78295c was e78295c, checked in by beratkjufliju <kufliju@…>, 3 years ago

added version

  • Property mode set to 100644
File size: 490 bytes
Line 
1<?php
2
3namespace Database\Seeders;
4
5use App\Models\Department;
6use App\Models\Folder;
7use Carbon\Carbon;
8use Illuminate\Database\Seeder;
9
10class FoldersTableSeeder extends Seeder
11{
12 /**
13 * Run the database seeds.
14 *
15 * @return void
16 */
17 public function run()
18 {
19 Folder::factory()->count(15)->create();
20 $folders = Folder::all();
21
22 foreach ($folders as $folder) {
23 $folder->department()->increment('no_of_folders');
24 }
25 }
26}
Note: See TracBrowser for help on using the repository browser.