Feat: add database seeders for all models
This commit is contained in:
@@ -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']
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user