snipe-it/database/seeders/StatuslabelSeeder.php

38 lines
1.1 KiB
PHP
Raw Normal View History

2016-03-25 01:18:05 -07:00
<?php
2021-06-10 13:18:00 -07:00
namespace Database\Seeders;
use App\Models\Statuslabel;
use App\Models\User;
use Illuminate\Database\Seeder;
2016-03-25 01:18:05 -07:00
class StatuslabelSeeder extends Seeder
{
public function run()
{
Statuslabel::truncate();
$admin = User::where('permissions->superuser', '1')->first() ?? User::factory()->firstAdmin()->create();
Statuslabel::factory()->rtd()->create([
'name' => 'Ready to Deploy',
'user_id' => $admin->id,
]);
Statuslabel::factory()->pending()->create([
'name' => 'Pending',
'user_id' => $admin->id,
]);
Statuslabel::factory()->archived()->create([
'name' => 'Archived',
'user_id' => $admin->id,
]);
Statuslabel::factory()->outForDiagnostics()->create(['user_id' => $admin->id]);
Statuslabel::factory()->outForRepair()->create(['user_id' => $admin->id]);
Statuslabel::factory()->broken()->create(['user_id' => $admin->id]);
Statuslabel::factory()->lost()->create(['user_id' => $admin->id]);
2016-03-25 01:18:05 -07:00
}
}