diff --git a/app/Http/Controllers/admin/PageController.php b/app/Http/Controllers/admin/PageController.php
index 1e214f1..61afb69 100644
--- a/app/Http/Controllers/admin/PageController.php
+++ b/app/Http/Controllers/admin/PageController.php
@@ -133,6 +133,7 @@ class PageController extends Controller
$carry[$facultyName]['id'] = $facultyId;
$carry[$facultyName]['name'] = $facultyName;
$carry[$facultyName]['description'] = $facultyDescription;
+ $carry[$facultyName]['directions'][$directionName]['name'] = $directionName;
$carry[$facultyName]['directions'][$directionName]['id'] = $directionId;
$carry[$facultyName]['directions'][$directionName]['code'] = $directionCode;
$carry[$facultyName]['directions'][$directionName]['education_level'] = $educationLevelName;
diff --git a/app/Services/DirectonHtmlBuilder.php b/app/Services/DirectonHtmlBuilder.php
index 3575c6f..e14d14a 100644
--- a/app/Services/DirectonHtmlBuilder.php
+++ b/app/Services/DirectonHtmlBuilder.php
@@ -16,77 +16,43 @@ class DirectonHtmlBuilder
public function getHTML()
{
-
-
$direction = $this->direction;
-
-
$fon_3 = URL::to('img/front-page/bakalavr-special/fon3_blok.png');
-
- $educationForms = '';
- foreach ($direction['educationForms'] as $key => $educationForm) {
- $educationForms .= $key . ', ';
+ $education_form = '';
+ foreach ($direction['education_form'] as $el) {
+ $education_form .= $el . ', ';
}
- $educationForms = substr($educationForms, 0, -2);
+ $education_form = substr($education_form, 0, -2);
- // phpcs:disable
-
- $budget_places_array = array();
- foreach ($direction['educationForms'] as $key => $educationForm) {
- $budget_places_array[$key] = $educationForm['budget_places'];
- }
- $budget_places = '
';
- foreach ($budget_places_array as $key => $item) {
- $budget_places .= "$key - $item
";
- }
-
- $period_array = array();
- foreach ($direction['educationForms'] as $key => $period) {
- $period_array[$key] = $period['period'];
- }
$period = '
';
- foreach ($period_array as $key => $item) {
- $period .= "$key - $item
";
+ foreach ($direction['period'] as $key => $el) {
+ $period .= '' . $key . ' - ' . '' . $el . '
' ;
}
- $profiles = '';
- //if (array_key_exists('educationalInstitution',$direction)) echo '+++++'; else echo '----';
- //exit();
-// if (array_key_exists('educationalInstitution', $direction)) {
-// foreach ($direction['educationalInstitution'] as $educationalInstitution_name => $educationalInstitution) {
-//
-// $profiles .= "
{$educationalInstitution_name}
"; -// foreach ($educationalInstitution as $profile_name => $profile) { -// $profile_out = '' . print_r($direction,1) . ''; -// $profiles .= " -//-//-// "; -// } -// }; -// } + + $EGE = '-//-//-// -//
-//-//-//-// $profile_out -// -// -// -//-//
'; + foreach ($direction['entrance_examinations']['ЕГЭ']['Обязательные'] as $key => $el) { + $EGE .= '' . $key . ' - ' . '' . $el . '
' ; + } + //dd($direction); + $po_viboru = '
'; + if(array_key_exists('Предметы по выбору', $direction['entrance_examinations']['ЕГЭ'])){ + foreach ($direction['entrance_examinations']['ЕГЭ']['Предметы по выбору'] as $key => $el) { + $po_viboru .= '' . $key . ' - ' . '' . $el . '
' ; + } + } + $SPO = '
'; + if(array_key_exists('СПО', $direction['entrance_examinations'])){ + foreach ($direction['entrance_examinations']['СПО']['Обязательные'] as $key => $el) { + $SPO .= '' . $key . ' - ' . '' . $el . '
' ; + } + } + + + + + return "@@ -122,13 +88,13 @@ class DirectonHtmlBuilder@@ -141,6 +107,22 @@ class DirectonHtmlBuilderУровень образования: - {$direction['educationLevel']} + {$direction['education_level']}Форма обучения: - $educationForms + {$education_form}Период обучения (в годах): - {$period} + $perioddiff --git a/resources/views/new-design/bakalavr-special.blade.php b/resources/views/new-design/bakalavr-special.blade.php index e198121..9b3fac1 100644 --- a/resources/views/new-design/bakalavr-special.blade.php +++ b/resources/views/new-design/bakalavr-special.blade.php @@ -363,20 +363,21 @@+ Проходные баллы: ++++ ЕГЭ + $EGE +++ Предметы по выбору + $po_viboru +++ СПО + $SPO ++@php use App\Services\DirectonHtmlBuilder; @endphp - @foreach($faculties as $faculty) + @foreach($groupedDirections as $faculty) +- -