From 7d263c5eb2b18951005ee4276597dd2596ab4795 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=20=D0=9B=D0=B0=D1=80?= =?UTF-8?q?=D0=B8=D0=BE=D0=BD=D0=BE=D0=B2?= Date: Tue, 12 Mar 2024 08:33:33 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9A=D0=BE=D0=BC=D0=BC=D0=B8=D1=82=20=D0=B2=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=BD=D0=B8=D0=BA=20-2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/MainController.php | 11 ++----- ...24_03_11_141704_create_response_works_table.php | 34 ++++++++++++++++++++ resources/views/ajax/list_vacancies.blade.php | 2 +- resources/views/detail_new.blade.php | 5 ++- resources/views/errors/404.blade.php | 19 +++++++++++ resources/views/index.blade.php | 2 +- resources/views/info_company_new.blade.php | 2 +- resources/views/layout/frontend.blade.php | 2 ++ resources/views/layout/pdf.blade.php | 10 ++---- resources/views/list_vacancies.blade.php | 2 +- resources/views/news-list.blade.php | 4 +-- resources/views/paginate.blade.php | 12 +++++-- resources/views/vacance-item.blade.php | 2 +- resources/views/worker.blade.php | 31 ++++++++++++++---- routes/web.php | 2 ++ 15 files changed, 106 insertions(+), 34 deletions(-) create mode 100644 database/migrations/2024_03_11_141704_create_response_works_table.php create mode 100644 resources/views/errors/404.blade.php diff --git a/app/Http/Controllers/MainController.php b/app/Http/Controllers/MainController.php index 6817021..ecbde34 100644 --- a/app/Http/Controllers/MainController.php +++ b/app/Http/Controllers/MainController.php @@ -58,16 +58,11 @@ class MainController extends Controller //категории и вакансии if (($request->has('job')) && ($request->get('job') > 0)) { - $categories = $categories->Where('job_title_id', '=', $request->get('job')) - ->OrderByDesc('created_at') - ->GroupBy('categories.id') - ->get(); - } else { - $categories = $categories->OrderByDesc('created_at') - ->GroupBy('categories.id') - ->get(); + $categories = $categories->Where('job_title_id', '=', $request->get('job')); } + $categories = $categories->OrderByDesc('created_at')->GroupBy('categories.id')->get(); + if ($request->ajax()) { return view('ajax.vacancies', compact('categories')); } else { diff --git a/database/migrations/2024_03_11_141704_create_response_works_table.php b/database/migrations/2024_03_11_141704_create_response_works_table.php new file mode 100644 index 0000000..813fb8d --- /dev/null +++ b/database/migrations/2024_03_11_141704_create_response_works_table.php @@ -0,0 +1,34 @@ +id(); + $table->bigInteger('worker_id')->nullable(false); + $table->integer('stars')->nullable(true); + $table->string('message', 255)->default('Без комментариев'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('response_works'); + } +}; diff --git a/resources/views/ajax/list_vacancies.blade.php b/resources/views/ajax/list_vacancies.blade.php index d8162b4..6cbb7ce 100644 --- a/resources/views/ajax/list_vacancies.blade.php +++ b/resources/views/ajax/list_vacancies.blade.php @@ -63,7 +63,7 @@ Подробнее
-
{{ $Q->created_at }}
+
{{ date('d.m.Y H:i:s', strtotime($Q->created_at)) }}
@@ -74,7 +74,6 @@ -
@@ -101,7 +100,7 @@
{{ $Q_item->title }}
- + {{ $Q_item->title }} {!! $Q_item->text !!} Читать далее diff --git a/resources/views/errors/404.blade.php b/resources/views/errors/404.blade.php new file mode 100644 index 0000000..aa70d9e --- /dev/null +++ b/resources/views/errors/404.blade.php @@ -0,0 +1,19 @@ +@extends('layout.frontend', ['title' => 'Судоходные компании РекаМоре']) + +@section('scripts') + +@endsection + +@section('content') +
+
+
+
404
+
Упс! Страница не найдена
+
Такой страницы не существует. Воспользуйтесь меню или перейдите на главную.
+ Перейти на главную +
+
+
+@endsection + diff --git a/resources/views/index.blade.php b/resources/views/index.blade.php index 2c02550..1dcb409 100644 --- a/resources/views/index.blade.php +++ b/resources/views/index.blade.php @@ -178,7 +178,7 @@
- + {{ $new->title }} {{ mb_strimwidth($new->text, 0, 100) }} Читать далее diff --git a/resources/views/info_company_new.blade.php b/resources/views/info_company_new.blade.php index 6fdbe00..3b66557 100644 --- a/resources/views/info_company_new.blade.php +++ b/resources/views/info_company_new.blade.php @@ -241,7 +241,7 @@ class="button button_light main__employer-page-two-item-button">Подробнее-->
-
{{ $job->updated_at }}
+
{{ date('d.m.Y H:i:s', strtotime($job->updated_at)) }}
- - - - - - - diff --git a/resources/views/list_vacancies.blade.php b/resources/views/list_vacancies.blade.php index 29b3ec1..b8ca4ec 100644 --- a/resources/views/list_vacancies.blade.php +++ b/resources/views/list_vacancies.blade.php @@ -225,7 +225,7 @@ Подробнее
-
{{ $Q->created_at }}
+
{{ date('d.m.Y H:i:s', strtotime($Q->created_at)) }}
@endforeach -
- {{ $Query->appends($_GET)->links('paginate') }} @else
diff --git a/resources/views/paginate.blade.php b/resources/views/paginate.blade.php index f10ebbd..ed46ef9 100644 --- a/resources/views/paginate.blade.php +++ b/resources/views/paginate.blade.php @@ -1,7 +1,11 @@ @if ($paginator->hasPages()) @endif diff --git a/resources/views/vacance-item.blade.php b/resources/views/vacance-item.blade.php index 61b377e..a371138 100644 --- a/resources/views/vacance-item.blade.php +++ b/resources/views/vacance-item.blade.php @@ -109,7 +109,7 @@
-
{{ $Q->created_at }}
+
{{ date('d.m.Y H:i:s', strtotime($Q->created_at)) }}
+
diff --git a/routes/web.php b/routes/web.php index 9ead850..1107b5b 100644 --- a/routes/web.php +++ b/routes/web.php @@ -442,6 +442,8 @@ Route::get('register_employer', [EmployerController::class, 'register_employer'] //восстановление пароля Route::get('repair-password', [MainController::class, 'repair_password'])->name('repair_password'); +// Звезда сообщения +Route::post('stars-answer', [WorkerController::class, 'stars_answer'])->name('stars_answer'); // Борьба Route::get('clear_cookie', function() { -- 1.7.10.4