base commit

This commit is contained in:
Mekan1206
2026-07-30 17:24:40 +05:00
commit a794dacd39
345 changed files with 29597 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<?php
declare(strict_types=1);
namespace Database\Seeders;
use App\Models\Department;
use App\Models\User;
use BezhanSalleh\FilamentShield\Support\Utils;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;
class AdminUserSeeder extends Seeder
{
public function run(): void
{
$admin = User::query()->updateOrCreate(
['email' => 'admin@company.com'],
[
'name' => 'Admin',
'password' => Hash::make('password'),
'email_verified_at' => now(),
'department_id' => Department::query()->where('code', 'ADM')->value('id'),
],
);
$admin->assignRole(Utils::getSuperAdminName());
}
}