forked from aslan/applicant-site
prodV1 #2
|
@ -32,16 +32,12 @@ class PageController extends Controller
|
|||
$subjects = EntranceExamination::all()
|
||||
->select('subject_id', 'subject_type_id', 'examination_type_id')
|
||||
->where('examination_type_id', '=', ExaminationTypeEnum::Ege->value)
|
||||
->groupBy('subject_type_id')->map(function ($examinate) {
|
||||
return $examinate->reduce(function (?array $carry, $subject) {
|
||||
->reduce(function (?array $carry, $subject) {
|
||||
$id = $subject['subject_id'];
|
||||
$value = Subject::find($id)->name;
|
||||
$carry[$id] = $value;
|
||||
return $carry;
|
||||
});
|
||||
})
|
||||
->toArray();
|
||||
|
||||
// $subjects = EntranceExamination::pluck('name', 'id');
|
||||
// $infBez = $faculties->find(FacultyEnum::InfBez->value);
|
||||
// $query = `select faculties.name, directions.name, directions.id
|
||||
|
|
Loading…
Reference in New Issue