migrate to gtea from bistbucket
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\HRM\Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Modules\HRM\Models\Department;
|
||||
|
||||
class DepartmentsTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$departments = [
|
||||
['restaurant_id' => 1, 'name' => 'Human Resources', 'description' => 'Manage users and HR processes'],
|
||||
['restaurant_id' => 1, 'name' => 'Finance', 'description' => 'Handle accounting and payroll'],
|
||||
['restaurant_id' => 1, 'name' => 'Operations', 'description' => 'Manage daily restaurant operations'],
|
||||
['restaurant_id' => 1, 'name' => 'Kitchen', 'description' => 'Manage cooking and kitchen staff'],
|
||||
['restaurant_id' => 1, 'name' => 'Service', 'description' => 'Waiters and customer service'],
|
||||
];
|
||||
|
||||
foreach ($departments as $dept) {
|
||||
Department::updateOrCreate(['name' => $dept['name']], $dept);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user