migrant-web/database/seeders/WorkerCategorySeeder.php
2026-05-26 14:52:16 +05:30

29 lines
747 B
PHP

<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class WorkerCategorySeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
$categories = [
'Electrician', 'Mason', 'Plumber', 'Cleaner', 'Site Supervisor', 'Driver', 'General Helper',
'Childcare', 'Housekeeping', 'Cooking', 'Elderly Care'
];
foreach ($categories as $category) {
\Illuminate\Support\Facades\DB::table('worker_categories')->insertOrIgnore([
'name' => $category,
'created_at' => now(),
'updated_at' => now(),
]);
}
}
}