From 12a0a3100508ebd91e69d8e17a163d955191aea3 Mon Sep 17 00:00:00 2001 From: anazaryan Date: Wed, 11 Dec 2024 15:10:51 +0400 Subject: [PATCH] chat fixes --- app/Http/Controllers/HomeController.php | 6 ------ .../views/modals/chats/answer_to_admin_chat.blade.php | 2 +- resources/views/workers/dialog.blade.php | 12 +++++------- routes/web.php | 1 - 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index b899165..97be4c2 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -26,12 +26,6 @@ class HomeController extends Controller { return view('home'); } - public function ss(Request $request) - { - dd($request->all()); - - return view('home'); - } public function send_message(Request $request) { diff --git a/resources/views/modals/chats/answer_to_admin_chat.blade.php b/resources/views/modals/chats/answer_to_admin_chat.blade.php index 989606c..4aac8d8 100644 --- a/resources/views/modals/chats/answer_to_admin_chat.blade.php +++ b/resources/views/modals/chats/answer_to_admin_chat.blade.php @@ -38,7 +38,7 @@ $.ajax({ type: "POST", - url: "{{ route('employer.send_message') }}", + url: "{{ route('send_message') }}", data: { to_user_id: to_user_id, reply_message_id: reply_message_id, diff --git a/resources/views/workers/dialog.blade.php b/resources/views/workers/dialog.blade.php index 80da071..05c0ca1 100644 --- a/resources/views/workers/dialog.blade.php +++ b/resources/views/workers/dialog.blade.php @@ -196,13 +196,11 @@
- @if($chat->is_admin_chat) - - @endif + @if(\App\Models\Ad_employer::where('id', $it->ad_employer_id)->exists()) Отклик на вакансию {{ \App\Models\Ad_employer::find($it->ad_employer_id)->name }} diff --git a/routes/web.php b/routes/web.php index ca852e2..fe40182 100644 --- a/routes/web.php +++ b/routes/web.php @@ -648,5 +648,4 @@ Route::group([ Route::get('TestWorker', [WorkerController::class, 'TestWorker'])->name('TestWorker'); Route::post('send_message', [HomeController::class, 'send_message'])->name('send_message'); -Route::post('send_message/ss', [HomeController::class, 'ss'])->name('ss'); -- 1.7.10.4