mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-14 17:44:17 -08:00
1582d81e5b
Signed-off-by: snipe <snipe@snipe.net>
38 lines
1.1 KiB
PHP
Executable file
38 lines
1.1 KiB
PHP
Executable file
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Models\Statuslabel;
|
|
use App\Models\User;
|
|
use Illuminate\Database\Seeder;
|
|
|
|
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]);
|
|
}
|
|
}
|