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',
'created_by' => $admin->id,
]);
Statuslabel::factory()->pending()->create([
'name' => 'Pending',
'created_by' => $admin->id,
]);
Statuslabel::factory()->archived()->create([
'name' => 'Archived',
'created_by' => $admin->id,
]);
Statuslabel::factory()->outForDiagnostics()->create(['created_by' => $admin->id]);
Statuslabel::factory()->outForRepair()->create(['created_by' => $admin->id]);
Statuslabel::factory()->broken()->create(['created_by' => $admin->id]);
Statuslabel::factory()->lost()->create(['created_by' => $admin->id]);
2016-03-25 01:18:05 -07:00
}
}