29 lines
754 B
PHP
29 lines
754 B
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Models\Department;
|
|
use App\Models\Position;
|
|
use Illuminate\Database\Seeder;
|
|
|
|
class MasterDataSeeder extends Seeder
|
|
{
|
|
public function run(): void
|
|
{
|
|
$depts = [
|
|
['name' => 'Information Technology', 'description' => 'Bagian IT & Development'],
|
|
['name' => 'Human Resources', 'description' => 'Bagian Kepegawaian'],
|
|
['name' => 'Finance', 'description' => 'Bagian Keuangan'],
|
|
];
|
|
|
|
foreach ($depts as $dept) {
|
|
Department::create($dept);
|
|
}
|
|
|
|
$positions = ['Manager', 'Senior Developer', 'Staff Admin', 'HR Specialist'];
|
|
|
|
foreach ($positions as $pos) {
|
|
Position::create(['name' => $pos]);
|
|
}
|
|
}
|
|
} |