Some checks failed
continuous-integration/drone/push Build is failing
- Complete GGZ Ecademy Laravel backend application - RESTful API for learning products, members, filters - Authentication and authorization system - Database migrations and seeders - Custom CRUD generator commands - Email notification system - Integration with frontend applications
42 lines
822 B
PHP
42 lines
822 B
PHP
<?php
|
|
|
|
use Illuminate\Support\Arr;
|
|
use App\Services\BranchService;
|
|
use Illuminate\Database\Seeder;
|
|
|
|
class BranchSeeder extends Seeder
|
|
{
|
|
|
|
private $branchService;
|
|
|
|
public function __construct(BranchService $branchService)
|
|
{
|
|
$this->branchService = $branchService;
|
|
}
|
|
|
|
/**
|
|
* Run the database seeds.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function run()
|
|
{
|
|
$branches = [
|
|
"Begeleid wonen",
|
|
"Forensische zorg",
|
|
"Kinder- en jeugdpsychiatrie",
|
|
"LVB-SGLVG",
|
|
"mbo's en hbo's",
|
|
"Specialistische ggz",
|
|
"Verslavingszorg",
|
|
"vLOGO",
|
|
];
|
|
|
|
foreach ($branches as $branch) {
|
|
|
|
$new_branch = $this->branchService->save(['title' => $branch]);
|
|
|
|
}
|
|
}
|
|
}
|