diff --git a/app/Console/Commands/CreateAdminChat.php b/app/Console/Commands/CreateAdminChat.php index 62db1fb..18b02ef 100644 --- a/app/Console/Commands/CreateAdminChat.php +++ b/app/Console/Commands/CreateAdminChat.php @@ -36,6 +36,7 @@ class CreateAdminChat extends Command $chats = Chat::query() ->where('is_admin_chat', 1) ->orWhere('to_user_id', $superAdmin->id) + ->orWhere('user_id', $superAdmin->id) ->get(); foreach ($chats as $chat) { diff --git a/app/Http/Controllers/EmployerController.php b/app/Http/Controllers/EmployerController.php index c8f18f8..01e6ba1 100644 --- a/app/Http/Controllers/EmployerController.php +++ b/app/Http/Controllers/EmployerController.php @@ -493,7 +493,7 @@ class EmployerController extends Controller // Отправка сообщения от работодателя public function send_message(MessagesRequiest $request) { $params = $request->all(); - dd($params); + $user1 = $params['user_id']; $user2 = $params['to_user_id']; @@ -606,7 +606,10 @@ class EmployerController extends Controller //Настройка уведомлений public function subscribe() { - return view('employers.subcribe'); + + $user=Auth::user(); + + return view('employers.subcribe',compact('user')); } //Установка уведомлений сохранение diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 97be4c2..b899165 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -26,6 +26,12 @@ 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/employers/dialog.blade.php b/resources/views/employers/dialog.blade.php index 74e27ce..59b775a 100644 --- a/resources/views/employers/dialog.blade.php +++ b/resources/views/employers/dialog.blade.php @@ -191,19 +191,25 @@ @endif
+
+ + + @if(\App\Models\Ad_employer::where('id', $it->ad_employer_id)->exists()) -
Отклик на вакансию {{ \App\Models\Ad_employer::find($it->ad_employer_id)->name }} @if($it->text) Комментарий: {{ $it->text }} @endif -
@else @if($it->text) -
{{ $it->text }} -
@endif +
+ @endif @if ((isset($it->file)) && (!empty($it->file)))
@@ -253,14 +259,6 @@ @if($chat->is_admin_chat || $it->text || $it->reply_message_id || $it->ad_employer_id > 0)
- @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 }}"
@if($it->text) @@ -333,4 +331,5 @@
+ @include('modals.chats.answer_to_admin_chat') @endsection diff --git a/resources/views/modals/chats/answer_from_admin_chat.blade.php b/resources/views/modals/chats/answer_from_admin_chat.blade.php index 1f54fa9..93857f8 100644 --- a/resources/views/modals/chats/answer_from_admin_chat.blade.php +++ b/resources/views/modals/chats/answer_from_admin_chat.blade.php @@ -1,7 +1,7 @@