75 lines
2.1 KiB
PHP
75 lines
2.1 KiB
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
|
use Illuminate\Database\Seeder;
|
|
|
|
use Illuminate\Support\Facades\Hash;
|
|
|
|
class DatabaseSeeder extends Seeder
|
|
{
|
|
use WithoutModelEvents;
|
|
|
|
/**
|
|
* Seed the application's database.
|
|
*/
|
|
public function run(): void
|
|
{
|
|
// Seed default administrator
|
|
User::updateOrCreate(
|
|
['email' => 'admin@company.com'],
|
|
[
|
|
'name' => 'System Administrator',
|
|
'password' => Hash::make('Admin@123'),
|
|
'role' => 'admin',
|
|
]
|
|
);
|
|
|
|
// Seed default standard user (without password since users use Microsoft OAuth)
|
|
User::updateOrCreate(
|
|
['email' => 'user@company.com'],
|
|
[
|
|
'name' => 'John Doe User',
|
|
'role' => 'user',
|
|
'microsoft_id' => 'mock-microsoft-id-123',
|
|
]
|
|
);
|
|
|
|
// Seed default apps
|
|
\App\Models\App::updateOrCreate(
|
|
['name' => 'Outlook'],
|
|
[
|
|
'url' => 'https://outlook.office.com/mail/',
|
|
'icon_svg' => 'outlook',
|
|
'color' => '#0078d4',
|
|
'desc' => 'Access your corporate mail, calendar, and contacts instantly.',
|
|
'tag' => 'Microsoft 365'
|
|
]
|
|
);
|
|
|
|
\App\Models\App::updateOrCreate(
|
|
['name' => 'Microsoft Teams'],
|
|
[
|
|
'url' => 'https://teams.microsoft.com/v2/',
|
|
'icon_svg' => 'teams',
|
|
'color' => '#6264a7',
|
|
'desc' => 'Chat, meet, call, and collaborate with your team.',
|
|
'tag' => 'Microsoft 365'
|
|
]
|
|
);
|
|
|
|
\App\Models\App::updateOrCreate(
|
|
['name' => 'Keka HR'],
|
|
[
|
|
'url' => 'https://sentientgeeks.keka.com/',
|
|
'icon_svg' => 'keka',
|
|
'color' => '#f27059',
|
|
'desc' => 'Manage timesheets, leaves, payroll, and performance tasks.',
|
|
'tag' => 'HR Portal'
|
|
]
|
|
);
|
|
}
|
|
}
|