2016-03-25 01:18:05 -07:00
|
|
|
<?php
|
2021-06-10 13:15:52 -07:00
|
|
|
|
2021-06-10 13:18:00 -07:00
|
|
|
namespace Database\Seeders;
|
|
|
|
|
2016-03-25 01:18:05 -07:00
|
|
|
use App\Models\Category;
|
2023-03-20 11:19:34 -07:00
|
|
|
use App\Models\User;
|
2021-06-10 13:15:52 -07:00
|
|
|
use Illuminate\Database\Seeder;
|
2016-03-25 01:18:05 -07:00
|
|
|
|
|
|
|
class CategorySeeder extends Seeder
|
|
|
|
{
|
|
|
|
public function run()
|
|
|
|
{
|
|
|
|
Category::truncate();
|
2017-10-07 02:27:02 -07:00
|
|
|
|
2023-03-20 11:19:34 -07:00
|
|
|
$admin = User::where('permissions->superuser', '1')->first() ?? User::factory()->firstAdmin()->create();
|
|
|
|
|
2023-03-20 11:42:15 -07:00
|
|
|
Category::factory()->count(1)->assetLaptopCategory()->create(['user_id' => $admin->id]);
|
|
|
|
Category::factory()->count(1)->assetDesktopCategory()->create(['user_id' => $admin->id]);
|
|
|
|
Category::factory()->count(1)->assetTabletCategory()->create(['user_id' => $admin->id]);
|
|
|
|
Category::factory()->count(1)->assetMobileCategory()->create(['user_id' => $admin->id]);
|
|
|
|
Category::factory()->count(1)->assetDisplayCategory()->create(['user_id' => $admin->id]);
|
|
|
|
Category::factory()->count(1)->assetVoipCategory()->create(['user_id' => $admin->id]);
|
|
|
|
Category::factory()->count(1)->assetConferenceCategory()->create(['user_id' => $admin->id]);
|
|
|
|
Category::factory()->count(1)->accessoryKeyboardCategory()->create(['user_id' => $admin->id]);
|
|
|
|
Category::factory()->count(1)->accessoryMouseCategory()->create(['user_id' => $admin->id]);
|
|
|
|
Category::factory()->count(1)->consumablePaperCategory()->create(['user_id' => $admin->id]);
|
|
|
|
Category::factory()->count(1)->consumableInkCategory()->create(['user_id' => $admin->id]);
|
|
|
|
Category::factory()->count(1)->componentHddCategory()->create(['user_id' => $admin->id]);
|
|
|
|
Category::factory()->count(1)->componentRamCategory()->create(['user_id' => $admin->id]);
|
|
|
|
Category::factory()->count(1)->licenseGraphicsCategory()->create(['user_id' => $admin->id]);
|
|
|
|
Category::factory()->count(1)->licenseOfficeCategory()->create(['user_id' => $admin->id]);
|
2016-03-25 01:18:05 -07:00
|
|
|
}
|
|
|
|
}
|