Feat: add database seeders for all models

This commit is contained in:
Sallu9007
2025-04-27 15:42:42 +05:30
parent a76092962d
commit 2217716225
7 changed files with 281 additions and 22 deletions

View File

@@ -2,23 +2,17 @@
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use App\Models\Role;
class RoleSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
public function run()
{
DB::table('departments')->insert([
['name' => 'Computer Engineering'],
['name' => 'Information Technology'],
['name' => 'Mechanical Engineering'],
['name' => 'Electrical Engineering'],
['name' => 'Civil Engineering'],
Role::insert([
['name' => 'Admin'],
['name' => 'Coordinator'],
['name' => 'Faculty']
]);
}
}