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,21 +2,19 @@
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use App\Models\Department;
class DepartmentSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
public function run()
{
DB::table('roles')->insert([
['name' => 'Admin'],
['name' => 'Coordinator'],
['name' => 'Faculty'],
Department::insert([
['name' => 'Computer Science'],
['name' => 'Mechanical Engineering'],
['name' => 'Electrical Engineering'],
['name' => 'Civil Engineering'],
['name' => 'Information Technology']
]);
}
}