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() {