add faculty to department
Tests & Lint & Deploy to Railway / build (2.6.6, 20.x, 8.3) (push) Successful in 1m50s Details
Tests & Lint & Deploy to Railway / deploy (push) Successful in 31s Details

This commit is contained in:
aslan 2024-03-13 16:14:27 +03:00
parent c35a3cefcb
commit 48767bbf27
1 changed files with 5 additions and 1 deletions

View File

@ -36,7 +36,11 @@ class DirectionController extends Controller
{ {
$levels = EducationLevel::pluck('name', 'id'); $levels = EducationLevel::pluck('name', 'id');
$forms = EducationForm::pluck('name', 'id'); $forms = EducationForm::pluck('name', 'id');
$departments = Department::pluck('name', 'id'); $departments = Department::all()
->reduce(function (?array $carry, $department) {
$carry[$department->id] = "{$department->name} - {$department->faculty->name}";
return $carry;
});
$examination_types = ExaminationType::pluck('name', 'id'); $examination_types = ExaminationType::pluck('name', 'id');
$subjects = Subject::pluck('name', 'id'); $subjects = Subject::pluck('name', 'id');
$subjectTypes = SubjectType::pluck('name', 'id'); $subjectTypes = SubjectType::pluck('name', 'id');