From dee85023d40516c9432da80f988c8380bfe4571b Mon Sep 17 00:00:00 2001 From: Holiienko Roman Date: Wed, 24 Jan 2024 15:23:23 +0300 Subject: [PATCH] new pages, renaming routes --- app/Services/PageScrapper.php | 1 + resources/views/home.blade.php | 2 +- resources/views/menu/abitur.blade.php | 12 ++++----- .../views/menu/abitur/aspirantura.blade.php | 19 ++++++++++++++ .../views/menu/abitur/ordinatura.blade.php | 19 ++++++++++++++ .../platnye-obrazovatelnye-uslugi.blade.php | 19 ++++++++++++++ ...omaterialy-dlya-postupayushchikh.blade.php | 25 +++++++++++++++++++ routes/web.php | 24 +++++++++++++++--- 8 files changed, 110 insertions(+), 11 deletions(-) create mode 100644 resources/views/menu/abitur/aspirantura.blade.php create mode 100644 resources/views/menu/abitur/ordinatura.blade.php create mode 100644 resources/views/menu/abitur/platnye-obrazovatelnye-uslugi.blade.php create mode 100644 resources/views/menu/abitur/videomaterialy-dlya-postupayushchikh.blade.php diff --git a/app/Services/PageScrapper.php b/app/Services/PageScrapper.php index 7c00dc6..f52aabe 100644 --- a/app/Services/PageScrapper.php +++ b/app/Services/PageScrapper.php @@ -37,6 +37,7 @@ class PageScrapper $content = str_replace($el,'https://mkgtu.ru' . $el,$content); } } + return $content; } diff --git a/resources/views/home.blade.php b/resources/views/home.blade.php index 6547279..51c2bf5 100644 --- a/resources/views/home.blade.php +++ b/resources/views/home.blade.php @@ -26,7 +26,7 @@
- +
diff --git a/resources/views/menu/abitur.blade.php b/resources/views/menu/abitur.blade.php index 6b8f89c..05dc9f7 100644 --- a/resources/views/menu/abitur.blade.php +++ b/resources/views/menu/abitur.blade.php @@ -60,7 +60,7 @@
- +

@@ -71,7 +71,7 @@
- +

@@ -82,7 +82,7 @@
- +

@@ -93,7 +93,7 @@
- +

@@ -104,7 +104,7 @@
- +

@@ -115,7 +115,7 @@
- +

diff --git a/resources/views/menu/abitur/aspirantura.blade.php b/resources/views/menu/abitur/aspirantura.blade.php new file mode 100644 index 0000000..aaf63ec --- /dev/null +++ b/resources/views/menu/abitur/aspirantura.blade.php @@ -0,0 +1,19 @@ +@extends('layouts.applicant-layout') +@section('content') +
Для поступающих на обучение по программам аспирантуры
+
+ +
+ @php + use App\Services\PageScrapper; + $pageScrapper = new PageScrapper("https://mkgtu.ru/postuplenie/priemnaya-kampaniya/aspirantura/", '
'); + $row = $pageScrapper->getHTML(); + $content = $pageScrapper->normalizeURLFile($row); + $content = $pageScrapper->cutHTML($content,'//isU'); + echo $content; + + @endphp + +
+
+@endsection diff --git a/resources/views/menu/abitur/ordinatura.blade.php b/resources/views/menu/abitur/ordinatura.blade.php new file mode 100644 index 0000000..62e14da --- /dev/null +++ b/resources/views/menu/abitur/ordinatura.blade.php @@ -0,0 +1,19 @@ +@extends('layouts.applicant-layout') +@section('content') +
Для поступающих на обучение по программам ординатуры
+
+ +
+ @php + use App\Services\PageScrapper; + $pageScrapper = new PageScrapper("https://mkgtu.ru/postuplenie/priemnaya-kampaniya/ordinatura/", '
'); + $row = $pageScrapper->getHTML(); + $content = $pageScrapper->normalizeURLFile($row); + $content = $pageScrapper->cutHTML($content,'//isU'); + echo $content; + + @endphp + +
+
+@endsection diff --git a/resources/views/menu/abitur/platnye-obrazovatelnye-uslugi.blade.php b/resources/views/menu/abitur/platnye-obrazovatelnye-uslugi.blade.php new file mode 100644 index 0000000..786c3ad --- /dev/null +++ b/resources/views/menu/abitur/platnye-obrazovatelnye-uslugi.blade.php @@ -0,0 +1,19 @@ +@extends('layouts.applicant-layout') +@section('content') +
Для поступающих на обучение по договорам об оказании платных образовательных услуг
+
+ +
+ @php + use App\Services\PageScrapper; + $pageScrapper = new PageScrapper("https://mkgtu.ru/postuplenie/priemnaya-kampaniya/platnye-obrazovatelnye-uslugi/", '
'); + $row = $pageScrapper->getHTML(); + $content = $pageScrapper->normalizeURLFile($row); + $content = $pageScrapper->cutHTML($content,'//isU'); + echo $content; + + @endphp + +
+
+@endsection diff --git a/resources/views/menu/abitur/videomaterialy-dlya-postupayushchikh.blade.php b/resources/views/menu/abitur/videomaterialy-dlya-postupayushchikh.blade.php new file mode 100644 index 0000000..cd0f407 --- /dev/null +++ b/resources/views/menu/abitur/videomaterialy-dlya-postupayushchikh.blade.php @@ -0,0 +1,25 @@ +@extends('layouts.applicant-layout') +@section('content') +
Видеоматериалы для поступающих
+
+ +
+ @php + use App\Services\PageScrapper; + $pageScrapper = new PageScrapper("https://mkgtu.ru/postuplenie/priemnaya-kampaniya/videomaterialy-dlya-postupayushchikh/", '
'); + $row = $pageScrapper->getHTML(); + $content = $pageScrapper->normalizeURLFile($row); + $content = $pageScrapper->cutHTML($content,'//isU'); + + $content = str_replace( + 'Обложка Госуслуги_page-0001.jpg', + 'Обложка Госуслуги_page-0001.jpg', + $content); + echo $content; + + @endphp + +
+
+@endsection + diff --git a/routes/web.php b/routes/web.php index 12e2918..d78de1f 100644 --- a/routes/web.php +++ b/routes/web.php @@ -30,22 +30,38 @@ Route::get('/course', function () { return view('menu.course'); })->name('course'); -Route::get('/abitur', function () { +Route::get('/applicant', function () { return view('menu.abitur'); -})->name('applicant'); +})->name('abitur'); Route::get('/web-consultations', function () { return view('menu.abitur.web-consultations'); })->name('web-consultations'); -Route::get('/spetsialitet-magistratura', function () { +Route::get('/specialty-magistracy', function () { return view('menu.abitur.spetsialitet-magistratura'); })->name('spetsialitet-magistratura'); -Route::get('/kolledzh', function () { +Route::get('/college', function () { return view('menu.abitur.kolledzh'); })->name('kolledzh'); +Route::get('/paid-educational-services', function () { + return view('menu.abitur.platnye-obrazovatelnye-uslugi'); +})->name('platnye-obrazovatelnye-uslugi'); + +Route::get('/residency', function () { + return view('menu.abitur.ordinatura'); +})->name('ordinatura'); + +Route::get('/traineeship', function () { + return view('menu.abitur.aspirantura'); +})->name('aspirantura'); + +Route::get('/video-materials-for-applicants', function () { + return view('menu.abitur.videomaterialy-dlya-postupayushchikh'); +})->name('videomaterialy-dlya-postupayushchikh'); + Route::post('/uploadfile', [UploadFileController::class, 'showUploadFile'])->name('uploadfile'); Route::get('/dashboard', function () {