forked from aslan/applicant-site
Compare commits
3 Commits
5fc547803c
...
ef1524b96e
Author | SHA1 | Date |
---|---|---|
ROMANGOLIENKO | ef1524b96e | |
aslan | 1aded8007b | |
aslan | b9ad413fbb |
|
@ -32,16 +32,12 @@ class PageController extends Controller
|
||||||
$subjects = EntranceExamination::all()
|
$subjects = EntranceExamination::all()
|
||||||
->select('subject_id', 'subject_type_id', 'examination_type_id')
|
->select('subject_id', 'subject_type_id', 'examination_type_id')
|
||||||
->where('examination_type_id', '=', ExaminationTypeEnum::Ege->value)
|
->where('examination_type_id', '=', ExaminationTypeEnum::Ege->value)
|
||||||
->groupBy('subject_type_id')->map(function ($examinate) {
|
->reduce(function (?array $carry, $subject) {
|
||||||
return $examinate->reduce(function (?array $carry, $subject) {
|
|
||||||
$id = $subject['subject_id'];
|
$id = $subject['subject_id'];
|
||||||
$value = Subject::find($id)->name;
|
$value = Subject::find($id)->name;
|
||||||
$carry[$id] = $value;
|
$carry[$id] = $value;
|
||||||
return $carry;
|
return $carry;
|
||||||
});
|
});
|
||||||
})
|
|
||||||
->toArray();
|
|
||||||
|
|
||||||
// $subjects = EntranceExamination::pluck('name', 'id');
|
// $subjects = EntranceExamination::pluck('name', 'id');
|
||||||
// $infBez = $faculties->find(FacultyEnum::InfBez->value);
|
// $infBez = $faculties->find(FacultyEnum::InfBez->value);
|
||||||
// $query = `select faculties.name, directions.name, directions.id
|
// $query = `select faculties.name, directions.name, directions.id
|
||||||
|
|
|
@ -424,7 +424,7 @@
|
||||||
<span class="checkmark"></span>
|
<span class="checkmark"></span>
|
||||||
</label>
|
</label>
|
||||||
@endif
|
@endif
|
||||||
@endforeac1
|
@endforeach
|
||||||
<hr class="col-5">
|
<hr class="col-5">
|
||||||
@foreach($subjects as $id => $name)
|
@foreach($subjects as $id => $name)
|
||||||
@if($name !== "Русский язык" && $name !== "Математика" )
|
@if($name !== "Русский язык" && $name !== "Математика" )
|
||||||
|
|
Loading…
Reference in New Issue