Changeset 24a616f for database/seeders/DepartmentsTableSeeder.php
- Timestamp:
- 10/13/21 15:44:57 (3 years ago)
- Branches:
- develop, master
- Children:
- 120759b
- Parents:
- 194a359
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
database/seeders/DepartmentsTableSeeder.php
r194a359 r24a616f 3 3 namespace Database\Seeders; 4 4 5 use App\Models\Department; 5 6 use Carbon\Carbon; 6 7 use Illuminate\Database\Seeder; … … 15 16 public function run() 16 17 { 17 \DB::table('departments')->insert([ 18 [ 19 "name" => "HR department", 20 "code" => "14", 21 "user_id" => "1", 22 "created_at" => Carbon::now()->format('Y-m-d H:i:s'), 23 ], 24 [ 25 "name" => "IT department", 26 "code" => "01", 27 "user_id" => "1", 28 "created_at" => Carbon::now()->format('Y-m-d H:i:s'), 29 ], 30 [ 31 "name" => "Business department", 32 "code" => "12", 33 "user_id" => "1", 34 "created_at" => Carbon::now()->format('Y-m-d H:i:s'), 35 ], 36 ]); 18 // \DB::table('departments')->insert([ 19 // [ 20 // "name" => "HR department", 21 // "code" => "14", 22 // "location" => "C:\laragon\www\SaveSpace\storage/Departments/14", 23 // "user_id" => "1", 24 // "created_at" => Carbon::now()->format('Y-m-d H:i:s'), 25 // ], 26 // [ 27 // "name" => "IT department", 28 // "code" => "01", 29 // "location" => "C:\laragon\www\SaveSpace\storage/Departments/01", 30 // "user_id" => "1", 31 // "created_at" => Carbon::now()->format('Y-m-d H:i:s'), 32 // ], 33 // [ 34 // "name" => "Business department", 35 // "code" => "12", 36 // "location" => "C:\laragon\www\SaveSpace\storage/Departments/12", 37 // "user_id" => "1", 38 // "created_at" => Carbon::now()->format('Y-m-d H:i:s'), 39 // ], 40 // ]); 41 42 Department::factory()->count(50)->create(); 37 43 } 38 44 }
Note:
See TracChangeset
for help on using the changeset viewer.