Commit d2571da21e3b6f70b6487739e045a68908c42676

Authored by Сергей П
1 parent 633ea705f9
Exists in master

Правки по массовой рассылке сообщений

Showing 9 changed files with 99 additions and 15 deletions Inline Diff

app/Http/Controllers/Admin/MsgAnswersController.php
1 <?php 1 <?php
2 2
3 namespace App\Http\Controllers\Admin; 3 namespace App\Http\Controllers\Admin;
4 4
5 use App\Http\Controllers\Controller; 5 use App\Http\Controllers\Controller;
6 use App\Models\Message; 6 use App\Models\Message;
7 use App\Models\MessagesRequests; 7 use App\Models\MessagesRequests;
8 use App\Models\User; 8 use App\Models\User;
9 use Illuminate\Database\Eloquent\Builder; 9 use Illuminate\Database\Eloquent\Builder;
10 use Illuminate\Http\Request; 10 use Illuminate\Http\Request;
11 use Illuminate\Support\Facades\Auth; 11 use Illuminate\Support\Facades\Auth;
12 use Illuminate\Support\Facades\DB; 12 use Illuminate\Support\Facades\DB;
13 use Illuminate\Support\Facades\Validator; 13 use Illuminate\Support\Facades\Validator;
14 14
15 class MsgAnswersController extends Controller 15 class MsgAnswersController extends Controller
16 { 16 {
17 public function messages(Request $request) { 17 public function messages(Request $request) {
18 $find_key = ""; 18 $find_key = "";
19 $find_cat = ""; 19 $find_cat = "";
20 $Msgs = Message::with('user_from')->with('user_to'); //->with('response'); 20 $Msgs = Message::with('user_from')->with('user_to'); //->with('response');
21 21
22 $Msgs = $this->filter($Msgs, $request, $find_key, $find_cat); 22 $Msgs = $this->filter($Msgs, $request, $find_key, $find_cat);
23 23
24 $Msgs = $Msgs->orderByDesc('created_at')->paginate(25); 24 $Msgs = $Msgs->orderByDesc('created_at')->paginate(25);
25 25
26 return view('admin.messages', compact('Msgs', 'find_key', 'find_cat')); 26 return view('admin.messages', compact('Msgs', 'find_key', 'find_cat'));
27 } 27 }
28 28
29 public function read_message(Message $message) { 29 public function read_message(Message $message) {
30 return view('admin.message-read', compact('message')); 30 return view('admin.message-read', compact('message'));
31 } 31 }
32 32
33 public function filter($Msgs, Request $request, &$find_key, &$find_cat) { 33 public function filter($Msgs, Request $request, &$find_key, &$find_cat) {
34 if (isset($request->find)) { 34 if (isset($request->find)) {
35 $find_key = $request->find; 35 $find_key = $request->find;
36 $Msgs = $Msgs->where(function($q) use ($find_key) { 36 $Msgs = $Msgs->where(function($q) use ($find_key) {
37 $q->whereHas('user_from', 37 $q->whereHas('user_from',
38 function (Builder $query) use ($find_key) { 38 function (Builder $query) use ($find_key) {
39 $query->where('name', 'LIKE', "%$find_key%"); 39 $query->where('name', 'LIKE', "%$find_key%");
40 } 40 }
41 )-> 41 )->
42 orWhereHas('user_to', 42 orWhereHas('user_to',
43 function (Builder $query) use ($find_key) { 43 function (Builder $query) use ($find_key) {
44 $query->where('name', 'LIKE', "%$find_key%"); 44 $query->where('name', 'LIKE', "%$find_key%");
45 } 45 }
46 ); 46 );
47 }); 47 });
48 } 48 }
49 49
50 if (isset($request->category)) { 50 if (isset($request->category)) {
51 $find_cat = $request->category; 51 $find_cat = $request->category;
52 52
53 switch ($find_cat) { 53 switch ($find_cat) {
54 case 'Работодатели': 54 case 'Работодатели':
55 $Msgs = $Msgs->where(function($q) { 55 $Msgs = $Msgs->where(function($q) {
56 $q->whereHas('user_to', 56 $q->whereHas('user_to',
57 function (Builder $query) { 57 function (Builder $query) {
58 $query->where('is_worker', '0'); 58 $query->where('is_worker', '0');
59 } 59 }
60 )->orwhereHas('user_from', 60 )->orwhereHas('user_from',
61 function (Builder $query) { 61 function (Builder $query) {
62 $query->where('is_worker', '0'); 62 $query->where('is_worker', '0');
63 } 63 }
64 ); 64 );
65 }); 65 });
66 break; 66 break;
67 case 'Соискатели': 67 case 'Соискатели':
68 $Msgs = $Msgs->where(function($q) { 68 $Msgs = $Msgs->where(function($q) {
69 $q->whereHas('user_to', 69 $q->whereHas('user_to',
70 function (Builder $query) { 70 function (Builder $query) {
71 $query->where('is_worker', '1'); 71 $query->where('is_worker', '1');
72 } 72 }
73 )->orwhereHas('user_from', 73 )->orwhereHas('user_from',
74 function (Builder $query) { 74 function (Builder $query) {
75 $query->where('is_worker', '1'); 75 $query->where('is_worker', '1');
76 } 76 }
77 ); 77 );
78 }); 78 });
79 break; 79 break;
80 case 'Администраторы': 80 case 'Администраторы':
81 $Msgs = $Msgs->where(function($q) { 81 $Msgs = $Msgs->where(function($q) {
82 $q->whereHas('user_to', 82 $q->whereHas('user_to',
83 function (Builder $query) { 83 function (Builder $query) {
84 $query->where('admin', '1'); 84 $query->where('admin', '1');
85 } 85 }
86 )->orwhereHas('user_from', 86 )->orwhereHas('user_from',
87 function (Builder $query) { 87 function (Builder $query) {
88 $query->where('admin', '1'); 88 $query->where('admin', '1');
89 } 89 }
90 ); 90 );
91 }); 91 });
92 break; 92 break;
93 default:break; 93 default:break;
94 } 94 }
95 } 95 }
96 96
97 return $Msgs; 97 return $Msgs;
98 98
99 } 99 }
100 100
101 public function reject_message(Request $request)
102 {
103 $message_request_id = $request->get('id');
104 $message_request = MessagesRequests::find($message_request_id);
105 $message_request->update(['is_rejected' => now()]);
106 return response()->json(['success' => true]);
107 }
108
109 public function send_message(Request $request)
110 {
111 $message_request_id = $request->get('id');
112 MessagesRequests::send_message($message_request_id);
113 return response()->json(['success' => true]);
114 }
115
101 public function admin_messages(Request $request) { 116 public function admin_messages(Request $request) {
102 if ($request->ajax()) { 117 if ($request->ajax()) {
103 $msg = Message::find($request->id); 118 $msg = Message::find($request->id);
104 $msg->flag_new = !($request->flag_new); 119 $msg->flag_new = !($request->flag_new);
105 $msg->save(); 120 $msg->save();
106 } 121 }
107 122
108 $id_admin = Auth::user()->id; 123 $id_admin = Auth::user()->id;
109 $users = User::query()->OrderBy('name')->where('is_bd', '=', '0')->get(); 124 $users = User::query()->OrderBy('name')->where('is_bd', '=', '0')->get();
110 125
111 $Msgs = MessagesRequests::query() 126 $Msgs = MessagesRequests::query()
112 ->with('user') 127 ->with('user')
113 ->orderByDesc('created_at') 128 ->orderByDesc('created_at')
114 ->paginate(10) 129 ->paginate(10)
115 ; 130 ;
116 131
117 if ($request->ajax()) 132 if ($request->ajax())
118 return view('admin.message.index_ajax', compact('Msgs', 'id_admin', 'users')); 133 return view('admin.message.index_ajax', compact('Msgs', 'id_admin', 'users'));
119 else 134 else
120 return view('admin.message.index', compact('Msgs', 'id_admin', 'users')); 135 return view('admin.message.index', compact('Msgs', 'id_admin', 'users'));
121 } 136 }
122 137
123 public function messages_sql(Request $request) { 138 public function messages_sql(Request $request) {
124 $id = Auth::user()->id; 139 $id = Auth::user()->id;
125 DB::enableQueryLog(); 140 DB::enableQueryLog();
126 //$query = DB::select('select * from users where id = :id', ['id' => 1]); 141 //$query = DB::select('select * from users where id = :id', ['id' => 1]);
127 $query = DB::select(DB::raw('SELECT u1.name as "To-user", u2.name as "From-user", m1.`text`, m1.created_at 142 $query = DB::select(DB::raw('SELECT u1.name as "To-user", u2.name as "From-user", m1.`text`, m1.created_at
128 FROM messages m1 143 FROM messages m1
129 JOIN (SELECT MAX(id) id FROM messages 144 JOIN (SELECT MAX(id) id FROM messages
130 GROUP BY LEAST(user_id, to_user_id), 145 GROUP BY LEAST(user_id, to_user_id),
131 GREATEST(user_id, to_user_id) 146 GREATEST(user_id, to_user_id)
132 ) m2 USING (id) 147 ) m2 USING (id)
133 JOIN users u1 ON u1.id = m1.user_id 148 JOIN users u1 ON u1.id = m1.user_id
134 JOIN users u2 ON u2.id = m1.to_user_id 149 JOIN users u2 ON u2.id = m1.to_user_id
135 Where ((m1.user_id = :uid) or (m1.to_user_id = :uid2)) 150 Where ((m1.user_id = :uid) or (m1.to_user_id = :uid2))
136 '), ['uid' => $id, 'uid2' => $id]); 151 '), ['uid' => $id, 'uid2' => $id]);
137 //dump(DB::getQueryLog()); 152 //dump(DB::getQueryLog());
138 dd($query); 153 dd($query);
139 return; 154 return;
140 } 155 }
141 156
142 public function admin_messages_post(Request $request) { 157 public function admin_messages_post(Request $request) {
143 $rules = [ 158 $rules = [
144 'title' => 'required|min:3|max:255', 159 'title' => 'required|min:3|max:255',
145 'text' => 'required|min:1' 160 'text' => 'required|min:1'
146 ]; 161 ];
147 162
148 $messages = [ 163 $messages = [
149 'required' => 'Поле не может быть пустым!', 164 'required' => 'Поле не может быть пустым!',
150 ]; 165 ];
151 166
152 $validator = Validator::make($request->all(), $rules, $messages); 167 $validator = Validator::make($request->all(), $rules, $messages);
153 168
154 if ($validator->fails()) { 169 if ($validator->fails()) {
155 return redirect()->route('admin.admin-messages')->withErrors($validator); 170 return redirect()->route('admin.admin-messages')->withErrors($validator);
156 } else { 171 } else {
157 $params = $request->all(); 172 $params = $request->all();
158 $id_admin = Auth::user()->id; 173 $id_admin = Auth::user()->id;
159 if ($request->has('file')) { 174 if ($request->has('file')) {
160 $params['file'] = $request->file('file')->store("upload/".$id_admin, 'public'); 175 $params['file'] = $request->file('file')->store("upload/".$id_admin, 'public');
161 } 176 }
162 Message::create($params); 177 Message::create($params);
163 return redirect()->route('admin.admin-messages'); 178 return redirect()->route('admin.admin-messages');
164 } 179 }
165 } 180 }
166 } 181 }
167 182
app/Models/MessagesRequests.php
1 <?php 1 <?php
2 2
3 namespace App\Models; 3 namespace App\Models;
4 4
5 use Illuminate\Database\Eloquent\Factories\HasFactory; 5 use Illuminate\Database\Eloquent\Factories\HasFactory;
6 use Illuminate\Database\Eloquent\Model; 6 use Illuminate\Database\Eloquent\Model;
7 7
8 class MessagesRequests extends Model 8 class MessagesRequests extends Model
9 { 9 {
10 use HasFactory; 10 use HasFactory;
11 11
12 protected $fillable = [ 12 protected $fillable = [
13 'user_id', 13 'user_id',
14 'job_titles', 14 'job_titles',
15 'text', 15 'text',
16 'is_rejected', 16 'is_rejected',
17 'is_sent' 17 'is_sent'
18 ]; 18 ];
19 19
20 public function getJobsAttribute() 20 public function getJobsAttribute()
21 { 21 {
22 $job_titles_ids = json_decode($this->attributes['job_titles'], true); 22 $job_titles_ids = json_decode($this->attributes['job_titles'], true);
23 return Job_title::whereIn('id', $job_titles_ids)->get(); 23 return Job_title::whereIn('id', $job_titles_ids)->get();
24 } 24 }
25 25
26 public function user() { 26 public function user() {
27 return $this->belongsTo(User::class, 'user_id'); 27 return $this->belongsTo(User::class, 'user_id');
28 } 28 }
29
30 public static function send_message($message_request_id)
31 {
32 $message_request = MessagesRequests::find($message_request_id);
33 $message_request->update(['is_sent' => now()]);
34
35 return true;
36 }
29 } 37 }
30 38
resources/views/admin/message/index.blade.php
1 @extends('layout.admin', ['title' => 'Админка - Сообщения адмистратора']) 1 @extends('layout.admin', ['title' => 'Админка - Сообщения адмистратора'])
2 2
3 @section('script') 3 @section('script')
4 <script> 4 <script>
5 $(document).ready(function() { 5 $(document).ready(function() {
6 $('.rejecte-button').click(function(){ 6 $('.rejecte-button').click(function(){
7 var this_btn = $(this); 7 var this_btn = $(this);
8 var wrap = this_btn.closest('tr'); 8 var wrap = this_btn.closest('tr');
9 var chat_id = wrap.data('message-id'); 9 var message_id = wrap.data('message-id');
10 var target = wrap.find('.user-name').text(); 10 var target = wrap.find('.user-name').text();
11 11
12 $('#rejecte_message').data('chat-id', chat_id); 12 $('#rejecte_message').data('message-id', message_id);
13 $('#rejecte_message').find('.user-name').text(target.trim()); 13 $('#rejecte_message').find('.user-name').text(target.trim());
14 $('#rejecte_message').find('.message-id').text(message_id);
15 });
16
17 $('.send-button').click(function(){cl(1000);
18 var this_btn = $(this);
19 var wrap = this_btn.closest('tr');
20 var message_id = wrap.data('message-id');
21 var target = wrap.find('.user-name').text();
22
23 $('#send_message').data('message-id', message_id);
24 $('#send_message').find('.user-name').text(target.trim());
25 $('#send_message').find('.message-id').text(message_id);
14 }); 26 });
15 27
16 $(document).on('change', '.checkread', function () { 28 $(document).on('change', '.checkread', function () {
17 var this_ = $(this); 29 var this_ = $(this);
18 var value = this_.val(); 30 var value = this_.val();
19 var ajax_block = $('#ajax_block'); 31 var ajax_block = $('#ajax_block');
20 var bool = 0; 32 var bool = 0;
21 33
22 if(this.checked){ 34 if(this.checked){
23 bool = 1; 35 bool = 1;
24 } else { 36 } else {
25 bool = 0; 37 bool = 0;
26 } 38 }
27 39
28 $.ajax({ 40 $.ajax({
29 type: "GET", 41 type: "GET",
30 url: "{{ url()->full()}}", 42 url: "{{ url()->full()}}",
31 data: "id=" + value + "&flag_new=" + bool, 43 data: "id=" + value + "&flag_new=" + bool,
32 success: function (data) { 44 success: function (data) {
33 console.log('Обновление таблицы сообщений администратора '); 45 console.log('Обновление таблицы сообщений администратора ');
34 //data = JSON.parse(data); 46 //data = JSON.parse(data);
35 //console.log(data); 47 //console.log(data);
36 ajax_block.html(data); 48 ajax_block.html(data);
37 }, 49 },
38 headers: { 50 headers: {
39 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 51 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
40 }, 52 },
41 error: function (data) { 53 error: function (data) {
42 console.log('Error: ' + data); 54 console.log('Error: ' + data);
43 } 55 }
44 }); 56 });
45 }); 57 });
46 58
47 }); 59 });
48 </script> 60 </script>
49 @endsection 61 @endsection
50 62
51 @section('content') 63 @section('content')
52 <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> 64 <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block">
53 <div class="w-full overflow-x-auto"> 65 <div class="w-full overflow-x-auto">
54 <table class="w-full whitespace-no-wrap"> 66 <table class="w-full whitespace-no-wrap">
55 <thead> 67 <thead>
56 <tr 68 <tr
57 class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" 69 class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800"
58 > 70 >
59 <th class="px-4 py-3">№</th> 71 <th class="px-4 py-3">№</th>
60 <th class="px-4 py-3">От юзера</th> 72 <th class="px-4 py-3">От юзера</th>
61 <th class="px-4 py-3">Должности</th> 73 <th class="px-4 py-3">Должности</th>
62 <th class="px-4 py-3">Текст</th> 74 <th class="px-4 py-3">Текст</th>
63 <th class="px-4 py-3">Дата</th> 75 <th class="px-4 py-3">Дата</th>
64 <th class="px-4 py-3">Прочтено</th> 76 <th class="px-4 py-3">Прочтено</th>
65 </tr> 77 </tr>
66 </thead> 78 </thead>
67 <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> 79 <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800">
68 @foreach($Msgs as $msg) 80 @foreach($Msgs as $msg)
69 <tr class="text-gray-700 dark:text-gray-400" data-message-id="{{ $msg->id }}"> 81 <tr class="text-gray-700 dark:text-gray-400" data-message-id="{{ $msg->id }}">
70 <td class="px-4 py-3"> 82 <td class="px-4 py-3">
71 {{ $msg->id }} 83 {{ $msg->id }}
72 </td> 84 </td>
73 <td class="px-4 py-3"> 85 <td class="px-4 py-3">
74 <div class="user-name"> 86 <div class="user-name">
75 @if (isset($msg->user->name)) 87 @if (isset($msg->user->name))
76 {{$msg->user->name}} ({{$msg->user->id}}) 88 {{$msg->user->name}} ({{$msg->user->id}})
77 @else 89 @else
78 Пользователь удален 90 Пользователь удален
79 @endif 91 @endif
80 </div> 92 </div>
81 </td> 93 </td>
82 <td class="px-4 py-3"> 94 <td class="px-4 py-3">
83 @if($msg->job_titles) 95 @if($msg->job_titles)
84 @foreach($msg->jobs as $job) 96 @foreach($msg->jobs as $job)
85 {{ $job->name }} 97 {{ $job->name }}
86 @if(!$loop->last) 98 @if(!$loop->last)
87 <br> 99 <br>
88 @endif 100 @endif
89 @endforeach 101 @endforeach
90 @endif 102 @endif
91 </td> 103 </td>
92 <td class="px-4 py-3"> 104 <td class="px-4 py-3">
93 <div> 105 <div>
94 {{ $msg->text }} 106 {{ $msg->text }}
95 </div> 107 </div>
96 </td> 108 </td>
97 <td class="px-4 py-3 text-sm"> 109 <td class="px-4 py-3 text-sm">
98 {{ date('d.m.Y h:i:s', strtotime($msg->created_at)) }} 110 {{ date('d.m.Y h:i:s', strtotime($msg->created_at)) }}
99 </td> 111 </td>
100 <td class="px-4 py-3"> 112 <td class="px-4 py-3">
101 @if($msg->is_rejected) 113 @if($msg->is_rejected)
102 Отклонено 114 Отклонено
103 @elseif($msg->is_sent) 115 @elseif($msg->is_sent)
104 Отправлено 116 Отправлено
105 @else 117 @else
106 <div class=""> 118 <div class="">
107 <button class="rejecte-button px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-red-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple" 119 <button class="rejecte-button px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-red-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"
108 data-fancybox data-src="#rejecte_message" 120 data-fancybox data-src="#rejecte_message"
109 > 121 >
110 Отклонить 122 Отклонить
111 </button> 123 </button>
112 <button class="send-button px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-green-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"> 124 <button class="send-button px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-green-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"
125 data-fancybox data-src="#send_message"
126 >
113 Отправить 127 Отправить
114 </button> 128 </button>
115 </div> 129 </div>
116 @endif 130 @endif
117 </td> 131 </td>
118 </tr> 132 </tr>
119 @endforeach 133 @endforeach
120 </tbody> 134 </tbody>
121 </table> 135 </table>
122 </div> 136 </div>
123 137
124 <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> 138 <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800">
125 <?=$Msgs->appends($_GET)->links('admin.pagginate'); ?> 139 <?=$Msgs->appends($_GET)->links('admin.pagginate'); ?>
126 </div> 140 </div>
127 </div><br> 141 </div><br>
128 142
129 <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block2"> 143 <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block2">
130 144
131 <form method="POST" action="{{ route('admin.admin-messages-post') }}" enctype="multipart/form-data"> 145 <form method="POST" action="{{ route('admin.admin-messages-post') }}" enctype="multipart/form-data">
132 @csrf 146 @csrf
133 <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"> 147 <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800">
134 <h3 class="text-gray-700 dark:text-gray-400">Отправка сообщения</h3> 148 <h3 class="text-gray-700 dark:text-gray-400">Отправка сообщения</h3>
135 <hr> 149 <hr>
136 <label for="ad_employer_id" class="block text-sm"> 150 <label for="ad_employer_id" class="block text-sm">
137 <input type="hidden" name="user_id" id="user_id" value="{{ $id_admin }}"/> 151 <input type="hidden" name="user_id" id="user_id" value="{{ $id_admin }}"/>
138 152
139 <span class="text-gray-700 dark:text-gray-400">Кому:</span> 153 <span class="text-gray-700 dark:text-gray-400">Кому:</span>
140 154
141 <select name="to_user_id" id="to_user_id" class="block change_js mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-select focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray"> 155 <select name="to_user_id" id="to_user_id" class="block change_js mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-select focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray">
142 @foreach($users as $user) 156 @foreach($users as $user)
143 <option value="{{ $user->id }}">{{ $user->name }} ({{ $user->id }})</option> 157 <option value="{{ $user->id }}">{{ $user->name }} ({{ $user->id }})</option>
144 @endforeach 158 @endforeach
145 </select> 159 </select>
146 </label><br> 160 </label><br>
147 161
148 <label class="block text-sm"> 162 <label class="block text-sm">
149 <span class="text-gray-700 dark:text-gray-400">Заголовок</span> 163 <span class="text-gray-700 dark:text-gray-400">Заголовок</span>
150 <input name="title" id="title" 164 <input name="title" id="title"
151 class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input" 165 class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
152 placeholder="Заголовок" value="{{ old('title') ?? '' }}" 166 placeholder="Заголовок" value="{{ old('title') ?? '' }}"
153 /> 167 />
154 @error('title') 168 @error('title')
155 <span class="text-xs text-red-600 dark:text-red-400"> 169 <span class="text-xs text-red-600 dark:text-red-400">
156 {{ $message }} 170 {{ $message }}
157 </span> 171 </span>
158 @enderror 172 @enderror
159 </label><br> 173 </label><br>
160 174
161 <label class="block text-sm"> 175 <label class="block text-sm">
162 <span class="text-gray-700 dark:text-gray-400">Текст</span> 176 <span class="text-gray-700 dark:text-gray-400">Текст</span>
163 <textarea class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-textarea focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray" name="text" placeholder="Текст" required 177 <textarea class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-textarea focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray" name="text" placeholder="Текст" required
164 rows="4">{{ old('text') ?? '' }}</textarea> 178 rows="4">{{ old('text') ?? '' }}</textarea>
165 @error('text') 179 @error('text')
166 <span class="text-xs text-red-600 dark:text-red-400"> 180 <span class="text-xs text-red-600 dark:text-red-400">
167 {{ $message }} 181 {{ $message }}
168 </span> 182 </span>
169 @enderror 183 @enderror
170 </label><br> 184 </label><br>
171 185
172 186
173 <label class="block text-sm"> 187 <label class="block text-sm">
174 <span class="text-gray-700 dark:text-gray-400">Файл</span> 188 <span class="text-gray-700 dark:text-gray-400">Файл</span>
175 <input type="file" class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 189 <input type="file" class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700
176 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple 190 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple
177 dark:text-gray-300 dark:focus:shadow-outline-gray form-input" 191 dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
178 id="file" name="file"> 192 id="file" name="file">
179 @error('file') 193 @error('file')
180 <span class="text-xs text-red-600 dark:text-red-400"> 194 <span class="text-xs text-red-600 dark:text-red-400">
181 {{ $message }} 195 {{ $message }}
182 </span> 196 </span>
183 @enderror 197 @enderror
184 </label><br> 198 </label><br>
185 199
186 <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4"> 200 <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4">
187 <div> 201 <div>
188 <button type="submit" class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"> 202 <button type="submit" class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple">
189 Отправить 203 Отправить
190 </button> 204 </button>
191 </div> 205 </div>
192 </div> 206 </div>
193 </div> 207 </div>
194 </form> 208 </form>
195 </div> 209 </div>
196 210
197 @include('modals.admin.messages.rejecte_message') 211 @include('modals.admin.messages.rejecte_message')
212 @include('modals.admin.messages.send_message')
198 @endsection 213 @endsection
199 214
resources/views/modals/admin/messages/rejecte_message.blade.php
1 <div class="hide"> 1 <div class="hide">
2 <div id="rejecte_message" class="modal-dialog"> 2 <div id="rejecte_message" class="modal-dialog">
3 <div class="modal-dialog-title"> 3 <div class="modal-dialog-title">
4 <h2>Отклонить сообщение</h2> 4 <h2>Отклонить сообщение</h2>
5 </div> 5 </div>
6 <div class="modal-dialog-body"> 6 <div class="modal-dialog-body">
7 <p>Вы действительно хотите отклонить сообщение №<span class="message-id"></span> от "<b><span class="user-name"></span></b>"?</p> 7 <p>Вы действительно хотите отклонить сообщение №<span class="message-id"></span> от "<b><span class="user-name"></span></b>"?</p>
8 </div> 8 </div>
9 <div class="modal-dialog-footer"> 9 <div class="modal-dialog-footer">
10 <button type="button" class="rejecte-message-button flex px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-red-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"> 10 @include('modals.admin.modal_buttons.red', ['adm_modal_btn_class' => 'rejecte-message-button', 'adm_modal_btn_title' => 'Отклонить'])
11 Отклонить 11 @include('modals.admin.modal_buttons.close', ['adm_modal_btn_title' => 'Закрыть'])
12 </button>
13 <button type="button" class="px-3 py-1 text-sm font-medium leading-5 transition-colors duration-150 bg-white border border-transparent rounded-md border-gray-300"
14 onclick="$.fancybox.close();">
15 Закрыть
16 </button>
17 </div> 12 </div>
18 </div> 13 </div>
19 </div> 14 </div>
20 15
21 <script> 16 <script>
22 $(function(){ 17 $(function(){
23 $('.rejecte-message-button').click(function(){ 18 $('.rejecte-message-button').click(function(){
24 spinStart($(this)); 19 spinStart($(this));
25 var wrap = $(this).closest('#rejecte_message'); 20 var wrap = $(this).closest('#rejecte_message');
26 var chat_id = wrap.data('chat-id'); 21 var message_id = wrap.data('message-id');
27 22
28 /*$.ajax({ 23 $.ajax({
29 type: "POST", 24 type: "POST",
30 url: "{{ route('employer.remove_chat') }}", 25 url: "{{ route('admin.reject_message') }}",
31 data: { 26 data: {
32 id: chat_id 27 id: message_id
33 }, 28 },
34 headers: { 29 headers: {
35 'X-CSRF-TOKEN': $('[name="_token"]').val() 30 'X-CSRF-TOKEN': $('[name="_token"]').val()
36 }, 31 },
37 success: function(){ 32 success: function(){
38 location.reload(); 33 location.reload();
39 } 34 }
40 });*/ 35 });
41 }); 36 });
42 }); 37 });
43 </script> 38 </script>
44 39
resources/views/modals/admin/messages/send_message.blade.php
File was created 1 <div class="hide">
2 <div id="send_message" class="modal-dialog">
3 <div class="modal-dialog-title">
4 <h2>Отправить сообщение</h2>
5 </div>
6 <div class="modal-dialog-body">
7 <p>Вы действительно хотите отправить сообщение №<span class="message-id"></span> от "<b><span class="user-name"></span></b>"?</p>
8 </div>
9 <div class="modal-dialog-footer">
10 @include('modals.admin.modal_buttons.green', ['adm_modal_btn_class' => 'send-message-button', 'adm_modal_btn_title' => 'Отправить'])
11 @include('modals.admin.modal_buttons.close', ['adm_modal_btn_title' => 'Закрыть'])
12 </div>
13 </div>
14 </div>
15
16 <script>
17 $(function(){
18 $('.send-message-button').click(function(){
19 spinStart($(this));
20 var wrap = $(this).closest('#send_message');
21 var message_id = wrap.data('message-id');
22
23 $.ajax({
24 type: "POST",
25 url: "{{ route('admin.send_message') }}",
26 data: {
27 id: message_id
28 },
29 headers: {
30 'X-CSRF-TOKEN': $('[name="_token"]').val()
31 },
32 success: function(){
33 location.reload();
34 }
35 });
36 });
37 });
38 </script>
39
resources/views/modals/admin/modal_buttons/close.blade.php
File was created 1 <button type="button" class="px-3 py-1 text-sm font-medium leading-5 transition-colors duration-150 bg-white border border-transparent rounded-md border-gray-300"
2 onclick="$.fancybox.close();">
3 {{ $adm_modal_btn_title ?? 'Закрыть' }}
4 </button>
5
resources/views/modals/admin/modal_buttons/green.blade.php
File was created 1 <button type="button" class="{{ $adm_modal_btn_class }} flex px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-green-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple">
2 {{ $adm_modal_btn_title }}
3 </button>
4
resources/views/modals/admin/modal_buttons/red.blade.php
File was created 1 <button type="button" class="{{ $adm_modal_btn_class }} flex px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-red-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple">
2 {{ $adm_modal_btn_title }}
3 </button>
4
1 <?php 1 <?php
2 2
3 use App\Http\Controllers\Ad_jobsController; 3 use App\Http\Controllers\Ad_jobsController;
4 use App\Http\Controllers\AdEmployerController; 4 use App\Http\Controllers\AdEmployerController;
5 use App\Http\Controllers\Admin\AdminController; 5 use App\Http\Controllers\Admin\AdminController;
6 use App\Http\Controllers\Admin\CategoryController; 6 use App\Http\Controllers\Admin\CategoryController;
7 use App\Http\Controllers\Admin\CategoryEmpController; 7 use App\Http\Controllers\Admin\CategoryEmpController;
8 use App\Http\Controllers\Admin\EducationController; 8 use App\Http\Controllers\Admin\EducationController;
9 use App\Http\Controllers\EducationController as EducationFrontController; 9 use App\Http\Controllers\EducationController as EducationFrontController;
10 use App\Http\Controllers\Admin\EmployersController; 10 use App\Http\Controllers\Admin\EmployersController;
11 use App\Http\Controllers\EmployerController as FrontEmployersController; 11 use App\Http\Controllers\EmployerController as FrontEmployersController;
12 use App\Http\Controllers\Admin\InfoBloksController; 12 use App\Http\Controllers\Admin\InfoBloksController;
13 use App\Http\Controllers\Admin\JobTitlesController; 13 use App\Http\Controllers\Admin\JobTitlesController;
14 use App\Http\Controllers\Admin\UsersController; 14 use App\Http\Controllers\Admin\UsersController;
15 use App\Http\Controllers\Admin\WorkersController; 15 use App\Http\Controllers\Admin\WorkersController;
16 use App\Http\Controllers\Auth\ForgotPasswordController; 16 use App\Http\Controllers\Auth\ForgotPasswordController;
17 use App\Http\Controllers\Auth\LoginController; 17 use App\Http\Controllers\Auth\LoginController;
18 use App\Http\Controllers\Auth\RegisterController; 18 use App\Http\Controllers\Auth\RegisterController;
19 use App\Http\Controllers\CKEditorController; 19 use App\Http\Controllers\CKEditorController;
20 use App\Http\Controllers\MediaController; 20 use App\Http\Controllers\MediaController;
21 use App\Http\Controllers\WorkerController; 21 use App\Http\Controllers\WorkerController;
22 use App\Models\Ad_jobs; 22 use App\Models\Ad_jobs;
23 use App\Models\User; 23 use App\Models\User;
24 use App\Http\Controllers\MainController; 24 use App\Http\Controllers\MainController;
25 use App\Http\Controllers\HomeController; 25 use App\Http\Controllers\HomeController;
26 use Illuminate\Support\Facades\Route; 26 use Illuminate\Support\Facades\Route;
27 use App\Http\Controllers\Admin\CompanyController; 27 use App\Http\Controllers\Admin\CompanyController;
28 use App\Http\Controllers\Admin\Ad_EmployersController; 28 use App\Http\Controllers\Admin\Ad_EmployersController;
29 use App\Http\Controllers\Admin\MsgAnswersController; 29 use App\Http\Controllers\Admin\MsgAnswersController;
30 use App\Http\Controllers\Admin\GroupsController; 30 use App\Http\Controllers\Admin\GroupsController;
31 use App\Http\Controllers\PagesController; 31 use App\Http\Controllers\PagesController;
32 use Illuminate\Support\Facades\Storage; 32 use Illuminate\Support\Facades\Storage;
33 use App\Http\Controllers\EmployerController; 33 use App\Http\Controllers\EmployerController;
34 use App\Http\Controllers\CompanyController as FrontCompanyController; 34 use App\Http\Controllers\CompanyController as FrontCompanyController;
35 35
36 36
37 /* 37 /*
38 |-------------------------------------------------------------------------- 38 |--------------------------------------------------------------------------
39 | Web Routes 39 | Web Routes
40 |-------------------------------------------------------------------------- 40 |--------------------------------------------------------------------------
41 | 41 |
42 | Here is where you can register web routes for your application. These 42 | Here is where you can register web routes for your application. These
43 | routes are loaded by the RouteServiceProvider within a group which 43 | routes are loaded by the RouteServiceProvider within a group which
44 | contains the "web" middleware group. Now create something great! 44 | contains the "web" middleware group. Now create something great!
45 | 45 |
46 */ 46 */
47 /* 47 /*
48 Route::get('/', function () { 48 Route::get('/', function () {
49 return view('welcome'); 49 return view('welcome');
50 })->name('index'); 50 })->name('index');
51 */ 51 */
52 52
53 Route::get('/', [MainController::class, 'index'])->name('index'); 53 Route::get('/', [MainController::class, 'index'])->name('index');
54 54
55 //Роуты авторизации, регистрации, восстановления, аутентификации 55 //Роуты авторизации, регистрации, восстановления, аутентификации
56 Auth::routes(['verify' => true]); 56 Auth::routes(['verify' => true]);
57 57
58 // роуты регистрации, авторизации, восстановления пароля, верификации почты 58 // роуты регистрации, авторизации, восстановления пароля, верификации почты
59 /*Route::group([ 59 /*Route::group([
60 'as' => 'auth.', //имя маршрута, например auth.index 60 'as' => 'auth.', //имя маршрута, например auth.index
61 'prefix' => 'auth', // префикс маршрута, например, auth/index 61 'prefix' => 'auth', // префикс маршрута, например, auth/index
62 ], function () { 62 ], function () {
63 //форма регистрации 63 //форма регистрации
64 Route::get('register', [RegisterController::class, 'register'])->name('register'); 64 Route::get('register', [RegisterController::class, 'register'])->name('register');
65 65
66 //создание пользователя 66 //создание пользователя
67 Route::post('register', [RegisterController::class, 'create'])->name('create'); 67 Route::post('register', [RegisterController::class, 'create'])->name('create');
68 68
69 //форма входа авторизации 69 //форма входа авторизации
70 Route::get('login', [LoginController::class, 'login'])->name('login'); 70 Route::get('login', [LoginController::class, 'login'])->name('login');
71 71
72 //аутентификация 72 //аутентификация
73 Route::post('login', [LoginController::class, 'authenticate'])->name('auth'); 73 Route::post('login', [LoginController::class, 'authenticate'])->name('auth');
74 74
75 //выход 75 //выход
76 Route::get('logout', [LoginController::class, 'logout'])->name('logout'); 76 Route::get('logout', [LoginController::class, 'logout'])->name('logout');
77 77
78 //форма ввода адреса почты 78 //форма ввода адреса почты
79 Route::get('forgot-password', [ForgotPasswordController::class, 'form'])->name('forgot-form'); 79 Route::get('forgot-password', [ForgotPasswordController::class, 'form'])->name('forgot-form');
80 80
81 //письмо на почту 81 //письмо на почту
82 Route::post('forgot-password', [ForgotPasswordController::class, 'mail'])->name('forgot-mail'); 82 Route::post('forgot-password', [ForgotPasswordController::class, 'mail'])->name('forgot-mail');
83 83
84 //форма восстановления пароля 84 //форма восстановления пароля
85 Route::get('reset-password/token/{token}/email/{email}', 85 Route::get('reset-password/token/{token}/email/{email}',
86 [ResetPasswordController::class, 'form'] 86 [ResetPasswordController::class, 'form']
87 )->name('reset-form'); 87 )->name('reset-form');
88 88
89 //восстановление пароля 89 //восстановление пароля
90 Route::post('reset-password', 90 Route::post('reset-password',
91 [ResetPasswordController::class, 'reset'] 91 [ResetPasswordController::class, 'reset']
92 )->name('reset-password'); 92 )->name('reset-password');
93 93
94 //сообщение о необходимости проверки адреса почты 94 //сообщение о необходимости проверки адреса почты
95 Route::get('verify-message', [VerifyEmailController::class, 'message'])->name('verify-message'); 95 Route::get('verify-message', [VerifyEmailController::class, 'message'])->name('verify-message');
96 96
97 //подтверждение адреса почты нового пользователя 97 //подтверждение адреса почты нового пользователя
98 Route::get('verify-email/token/{token}/id/{id}', [VerifyEmailController::class, 'verify']) 98 Route::get('verify-email/token/{token}/id/{id}', [VerifyEmailController::class, 'verify'])
99 ->where('token', '[a-f0-9]{32}') 99 ->where('token', '[a-f0-9]{32}')
100 ->where('id', '[0-9]+') 100 ->where('id', '[0-9]+')
101 ->name('verify-email'); 101 ->name('verify-email');
102 });*/ 102 });*/
103 103
104 //Личный кабинет пользователя 104 //Личный кабинет пользователя
105 Route::get('/home', [HomeController::class, 'index'])->name('home'); 105 Route::get('/home', [HomeController::class, 'index'])->name('home');
106 106
107 /* 107 /*
108 Route::post('resend/verification-email', function (\Illuminate\Http\Request $request) { 108 Route::post('resend/verification-email', function (\Illuminate\Http\Request $request) {
109 $user = User::where('email',$request->input('email'))->first(); 109 $user = User::where('email',$request->input('email'))->first();
110 110
111 $user->sendEmailVerificationNotification(); 111 $user->sendEmailVerificationNotification();
112 112
113 return 'your response'; 113 return 'your response';
114 })->middleware('throttle:6,1')->name('verification.resend'); 114 })->middleware('throttle:6,1')->name('verification.resend');
115 */ 115 */
116 116
117 // Авторизация, регистрация в админку 117 // Авторизация, регистрация в админку
118 Route::group([ 118 Route::group([
119 'as' => 'admin.', // имя маршрута, например auth.index 119 'as' => 'admin.', // имя маршрута, например auth.index
120 'prefix' => 'admin', // префикс маршрута, например auth/index 120 'prefix' => 'admin', // префикс маршрута, например auth/index
121 'middleware' => ['guest'], 121 'middleware' => ['guest'],
122 ], function () { 122 ], function () {
123 // Форма регистрации 123 // Форма регистрации
124 Route::get('register', [AdminController::class, 'register'])->name('register'); 124 Route::get('register', [AdminController::class, 'register'])->name('register');
125 // Создание пользователя 125 // Создание пользователя
126 Route::post('register', [AdminController::class, 'create'])->name('create'); 126 Route::post('register', [AdminController::class, 'create'])->name('create');
127 127
128 //Форма входа 128 //Форма входа
129 Route::get('login', [AdminController::class, 'login'])->name('login'); 129 Route::get('login', [AdminController::class, 'login'])->name('login');
130 130
131 // аутентификация 131 // аутентификация
132 Route::post('login', [AdminController::class, 'autenticate'])->name('auth'); 132 Route::post('login', [AdminController::class, 'autenticate'])->name('auth');
133 133
134 }); 134 });
135 135
136 // Личный кабинет админки 136 // Личный кабинет админки
137 Route::group([ 137 Route::group([
138 'as' => 'admin.', // имя маршрута, например auth.index 138 'as' => 'admin.', // имя маршрута, например auth.index
139 'prefix' => 'admin', // префикс маршрута, например auth/index 139 'prefix' => 'admin', // префикс маршрута, например auth/index
140 'middleware' => ['auth'], ['admin'], 140 'middleware' => ['auth'], ['admin'],
141 ], function() { 141 ], function() {
142 142
143 // выход 143 // выход
144 Route::get('logout', [AdminController::class, 'logout'])->name('logout'); 144 Route::get('logout', [AdminController::class, 'logout'])->name('logout');
145 145
146 // кабинет главная страница 146 // кабинет главная страница
147 Route::get('cabinet', [AdminController::class, 'index'])->name('index'); 147 Route::get('cabinet', [AdminController::class, 'index'])->name('index');
148 148
149 // кабинет профиль админа - форма 149 // кабинет профиль админа - форма
150 Route::get('profile', [AdminController::class, 'profile'])->name('profile'); 150 Route::get('profile', [AdminController::class, 'profile'])->name('profile');
151 // кабинет профиль админа - сохранение формы 151 // кабинет профиль админа - сохранение формы
152 Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile'); 152 Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile');
153 153
154 //кабинет сообщения админа 154 //кабинет сообщения админа
155 //Route::get('messages', [AdminController::class, 'profile'])->name('profile'); 155 //Route::get('messages', [AdminController::class, 'profile'])->name('profile');
156 156
157 157
158 // кабинет профиль - форма пароли 158 // кабинет профиль - форма пароли
159 Route::get('password', [AdminController::class, 'profile_password'])->name('password'); 159 Route::get('password', [AdminController::class, 'profile_password'])->name('password');
160 // кабинет профиль - сохранение формы пароля 160 // кабинет профиль - сохранение формы пароля
161 Route::post('password', [AdminController::class, 'profile_password_new'])->name('password'); 161 Route::post('password', [AdminController::class, 'profile_password_new'])->name('password');
162 162
163 163
164 // кабинет профиль пользователя - форма 164 // кабинет профиль пользователя - форма
165 Route::get('user-profile/{user}', [AdminController::class, 'profile_user'])->name('user-profile'); 165 Route::get('user-profile/{user}', [AdminController::class, 'profile_user'])->name('user-profile');
166 // кабинет профиль пользователя - сохранение формы 166 // кабинет профиль пользователя - сохранение формы
167 Route::post('user-profile/{user}', [AdminController::class, 'store_profile_user'])->name('user-store_profile'); 167 Route::post('user-profile/{user}', [AdminController::class, 'store_profile_user'])->name('user-store_profile');
168 168
169 // кабинет профиль работодатель - форма 169 // кабинет профиль работодатель - форма
170 Route::get('employer-profile/{employer}', [EmployersController::class, 'form_update_employer'])->name('employer-profile'); 170 Route::get('employer-profile/{employer}', [EmployersController::class, 'form_update_employer'])->name('employer-profile');
171 // кабинет профиль работодатель - сохранение формы 171 // кабинет профиль работодатель - сохранение формы
172 Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile'); 172 Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile');
173 // кабинет удаление профиль работодателя и юзера 173 // кабинет удаление профиль работодателя и юзера
174 Route::delete('employers/delete/{employer}/{user}', [EmployersController::class, 'delete_employer'])->name('delete-employer'); 174 Route::delete('employers/delete/{employer}/{user}', [EmployersController::class, 'delete_employer'])->name('delete-employer');
175 175
176 // кабинет профиль работник - форма 176 // кабинет профиль работник - форма
177 Route::get('worker-profile/add/{user}', [WorkersController::class, 'form_add_worker'])->name('worker-profile-add'); 177 Route::get('worker-profile/add/{user}', [WorkersController::class, 'form_add_worker'])->name('worker-profile-add');
178 Route::post('worker-profile/add/{user}', [WorkersController::class, 'form_store_worker'])->name('worker-profile-store'); 178 Route::post('worker-profile/add/{user}', [WorkersController::class, 'form_store_worker'])->name('worker-profile-store');
179 Route::get('worker-profile/{worker}', [WorkersController::class, 'form_edit_worker'])->name('worker-profile-edit'); 179 Route::get('worker-profile/{worker}', [WorkersController::class, 'form_edit_worker'])->name('worker-profile-edit');
180 // кабинет профиль работник - сохранение формы 180 // кабинет профиль работник - сохранение формы
181 Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile-update'); 181 Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile-update');
182 182
183 // Медиа 183 // Медиа
184 Route::get('media', [MediaController::class, 'index'])->name('media'); 184 Route::get('media', [MediaController::class, 'index'])->name('media');
185 Route::delete('media/{media}', [MediaController::class, 'delete'])->name('delete-media'); 185 Route::delete('media/{media}', [MediaController::class, 'delete'])->name('delete-media');
186 186
187 // кабинет настройки сайта - форма 187 // кабинет настройки сайта - форма
188 Route::get('config', [AdminController::class, 'config_form'])->name('config'); 188 Route::get('config', [AdminController::class, 'config_form'])->name('config');
189 // кабинет настройки сайта сохранение формы 189 // кабинет настройки сайта сохранение формы
190 Route::post('config', [AdminController::class, 'store_config'])->name('store_config'); 190 Route::post('config', [AdminController::class, 'store_config'])->name('store_config');
191 191
192 // кабинет - новости 192 // кабинет - новости
193 Route::get('news-list', [AdminController::class, 'news_admin'])->name('news_admin'); 193 Route::get('news-list', [AdminController::class, 'news_admin'])->name('news_admin');
194 Route::get('news/add', [AdminController::class, 'new_admin_add'])->name('new_admin_add'); 194 Route::get('news/add', [AdminController::class, 'new_admin_add'])->name('new_admin_add');
195 Route::post('news/add', [AdminController::class, 'new_admin_add_save'])->name('new_admin_save_add'); 195 Route::post('news/add', [AdminController::class, 'new_admin_add_save'])->name('new_admin_save_add');
196 Route::get('news/edit/{new}', [AdminController::class, 'new_admin_edit'])->name('new_admin_edit'); 196 Route::get('news/edit/{new}', [AdminController::class, 'new_admin_edit'])->name('new_admin_edit');
197 Route::post('news/edit/{new}', [AdminController::class, 'new_admin_update_save'])->name('new_admin_update'); 197 Route::post('news/edit/{new}', [AdminController::class, 'new_admin_update_save'])->name('new_admin_update');
198 Route::get('news/delete/{new}', [AdminController::class, 'new_admin_delete'])->name('new_admin_delete'); 198 Route::get('news/delete/{new}', [AdminController::class, 'new_admin_delete'])->name('new_admin_delete');
199 199
200 // кабинет - пользователи 200 // кабинет - пользователи
201 Route::get('users', [UsersController::class, 'index'])->name('users'); 201 Route::get('users', [UsersController::class, 'index'])->name('users');
202 Route::get('user-delete/{user}', [UsersController::class, 'user_delete'])->name('user_delete'); 202 Route::get('user-delete/{user}', [UsersController::class, 'user_delete'])->name('user_delete');
203 203
204 // кабинет - пользователи 204 // кабинет - пользователи
205 Route::get('admin-users', [AdminController::class, 'index_admin'])->name('admin-users'); 205 Route::get('admin-users', [AdminController::class, 'index_admin'])->name('admin-users');
206 206
207 // кабинет - работодатели 207 // кабинет - работодатели
208 Route::get('employers', [EmployersController::class, 'index'])->name('employers'); 208 Route::get('employers', [EmployersController::class, 'index'])->name('employers');
209 209
210 Route::get('employers/comment/{employer}', [EmployersController::class, 'comment_read'])->name('comment-employer'); 210 Route::get('employers/comment/{employer}', [EmployersController::class, 'comment_read'])->name('comment-employer');
211 211
212 Route::get('flot/add/{employer}', [EmployersController::class, 'add_flot'])->name('flot_add'); 212 Route::get('flot/add/{employer}', [EmployersController::class, 'add_flot'])->name('flot_add');
213 Route::post('flot/add', [EmployersController::class, 'save_add_flot'])->name('flot_add_save'); 213 Route::post('flot/add', [EmployersController::class, 'save_add_flot'])->name('flot_add_save');
214 Route::get('flot/{flot}/{employer}', [EmployersController::class, 'edit_flot'])->name('flot'); 214 Route::get('flot/{flot}/{employer}', [EmployersController::class, 'edit_flot'])->name('flot');
215 Route::put('flot/{flot}', [EmployersController::class, 'edit_save_flot'])->name('flot_edit'); 215 Route::put('flot/{flot}', [EmployersController::class, 'edit_save_flot'])->name('flot_edit');
216 Route::get('flot/{flot}/{employer_id}/delete', [EmployersController::class, 'delete_flot'])->name('flot_delete'); 216 Route::get('flot/{flot}/{employer_id}/delete', [EmployersController::class, 'delete_flot'])->name('flot_delete');
217 217
218 // кабинет - соискатели 218 // кабинет - соискатели
219 Route::get('workers', [WorkersController::class, 'index'])->name('workers'); 219 Route::get('workers', [WorkersController::class, 'index'])->name('workers');
220 220
221 // кабинет - база данных 221 // кабинет - база данных
222 Route::get('basedata', [UsersController::class, 'index_bd'])->name('basedata'); 222 Route::get('basedata', [UsersController::class, 'index_bd'])->name('basedata');
223 Route::get('basedata/add', [UsersController::class, 'add_bd'])->name('add-basedata'); 223 Route::get('basedata/add', [UsersController::class, 'add_bd'])->name('add-basedata');
224 Route::post('basedata/add', [UsersController::class, 'add_store_bd'])->name('add-store-basedata'); 224 Route::post('basedata/add', [UsersController::class, 'add_store_bd'])->name('add-store-basedata');
225 Route::get('basedata/edit/{user}', [UsersController::class, 'edit_bd'])->name('edit-basedata'); 225 Route::get('basedata/edit/{user}', [UsersController::class, 'edit_bd'])->name('edit-basedata');
226 Route::put('basedata/edit/{user}', [UsersController::class, 'update_bd'])->name('update-basedata'); 226 Route::put('basedata/edit/{user}', [UsersController::class, 'update_bd'])->name('update-basedata');
227 Route::delete('basedata/delete/{user}', [UsersController::class, 'destroy_bd'])->name('delete-basedata'); 227 Route::delete('basedata/delete/{user}', [UsersController::class, 'destroy_bd'])->name('delete-basedata');
228 Route::get('basedata/doc/{user}', [UsersController::class, 'doc_bd'])->name('doc-basedata'); 228 Route::get('basedata/doc/{user}', [UsersController::class, 'doc_bd'])->name('doc-basedata');
229 229
230 // кабинет - вакансии 230 // кабинет - вакансии
231 Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers'); 231 Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers');
232 Route::get('ad-employers/add', [Ad_EmployersController::class, 'create'])->name('add-ad-employers'); 232 Route::get('ad-employers/add', [Ad_EmployersController::class, 'create'])->name('add-ad-employers');
233 Route::post('ad-employers/add', [Ad_EmployersController::class, 'store'])->name('store-ad-employers'); 233 Route::post('ad-employers/add', [Ad_EmployersController::class, 'store'])->name('store-ad-employers');
234 Route::get('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'edit'])->name('edit-ad-employers'); 234 Route::get('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'edit'])->name('edit-ad-employers');
235 Route::post('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'update'])->name('update-ad-employers'); 235 Route::post('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'update'])->name('update-ad-employers');
236 Route::delete('ad-employers/delete/{ad_employer}', [Ad_EmployersController::class, 'destroy'])->name('delete-ad-employer'); 236 Route::delete('ad-employers/delete/{ad_employer}', [Ad_EmployersController::class, 'destroy'])->name('delete-ad-employer');
237 237
238 // Редактирование должности в вакансии 238 // Редактирование должности в вакансии
239 Route::put('update-jobs/{ad_jobs}', [Ad_EmployersController::class, 'update_ad_jobs'])->name('update_jobs'); 239 Route::put('update-jobs/{ad_jobs}', [Ad_EmployersController::class, 'update_ad_jobs'])->name('update_jobs');
240 Route::get('edit-jobs/{ad_jobs}', [Ad_EmployersController::class, 'edit_jobs'])->name('edit_jobs'); 240 Route::get('edit-jobs/{ad_jobs}', [Ad_EmployersController::class, 'edit_jobs'])->name('edit_jobs');
241 241
242 242
243 // кабинет - категории 243 // кабинет - категории
244 //Route::get('categories', [AdminController::class, 'index'])->name('categories'); 244 //Route::get('categories', [AdminController::class, 'index'])->name('categories');
245 245
246 // СRUD-операции над Справочником Категории 246 // СRUD-операции над Справочником Категории
247 247
248 Route::resource('categories', CategoryController::class, ['except' => ['show']]); 248 Route::resource('categories', CategoryController::class, ['except' => ['show']]);
249 249
250 // CRUD-операции над справочником Категории для работодателей 250 // CRUD-операции над справочником Категории для работодателей
251 Route::resource('category-emp', CategoryEmpController::class, ['except' => ['show']]); 251 Route::resource('category-emp', CategoryEmpController::class, ['except' => ['show']]);
252 252
253 // CRUD-операции над справочником Образование 253 // CRUD-операции над справочником Образование
254 Route::resource('education', EducationController::class, ['except' => ['show']]); 254 Route::resource('education', EducationController::class, ['except' => ['show']]);
255 255
256 Route::get('rename-program-education', [EducationController::class, 'rename_program'])->name('rename-program-education'); 256 Route::get('rename-program-education', [EducationController::class, 'rename_program'])->name('rename-program-education');
257 Route::get('program-education', [EducationController::class, 'add_program'])->name('add-program-education'); 257 Route::get('program-education', [EducationController::class, 'add_program'])->name('add-program-education');
258 Route::post('program-education', [EducationController::class, 'store_program'])->name('store-program-education'); 258 Route::post('program-education', [EducationController::class, 'store_program'])->name('store-program-education');
259 259
260 Route::get('program-education/edit/{program}/{education}', [EducationController::class, 'edit_program'])->name('edit-program-education'); 260 Route::get('program-education/edit/{program}/{education}', [EducationController::class, 'edit_program'])->name('edit-program-education');
261 Route::post('program-education/edit/{program}/{education}', [EducationController::class, 'update_program'])->name('update-program-education'); 261 Route::post('program-education/edit/{program}/{education}', [EducationController::class, 'update_program'])->name('update-program-education');
262 262
263 Route::get('program-education/delete/{program}/{education}', [EducationController::class, 'delete_program'])->name('delete-program-education'); 263 Route::get('program-education/delete/{program}/{education}', [EducationController::class, 'delete_program'])->name('delete-program-education');
264 264
265 //Route::get('job-titles', [AdminController::class, 'index'])->name('job-titles'); 265 //Route::get('job-titles', [AdminController::class, 'index'])->name('job-titles');
266 /* 266 /*
267 * кабинет - CRUD-операции по справочнику должности 267 * кабинет - CRUD-операции по справочнику должности
268 * 268 *
269 */ 269 */
270 Route::resource('job-titles', JobTitlesController::class, ['except' => ['show']]); 270 Route::resource('job-titles', JobTitlesController::class, ['except' => ['show']]);
271 271
272 // кабинет - сообщения (чтение чужих) 272 // кабинет - сообщения (чтение чужих)
273 Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages'); 273 Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages');
274 // кабинет - просмотр сообщения чужого (чтение) 274 // кабинет - просмотр сообщения чужого (чтение)
275 Route::get('messages/{message}', [MsgAnswersController::class, 'read_message'])->name('read-message'); 275 Route::get('messages/{message}', [MsgAnswersController::class, 'read_message'])->name('read-message');
276 276
277 // кабинет - сообщения (админские) 277 // кабинет - сообщения (админские)
278 Route::get('admin-messages', [MsgAnswersController::class, 'admin_messages'])->name('admin-messages'); 278 Route::get('admin-messages', [MsgAnswersController::class, 'admin_messages'])->name('admin-messages');
279 // кабинет - сообщения (админские) 279 // кабинет - сообщения (админские)
280 Route::post('admin-messages', [MsgAnswersController::class, 'admin_messages_post'])->name('admin-messages-post'); 280 Route::post('admin-messages', [MsgAnswersController::class, 'admin_messages_post'])->name('admin-messages-post');
281 // кабинет - sql - конструкция запросов 281 // кабинет - sql - конструкция запросов
282 Route::get('messages-sql', [MsgAnswersController::class, 'messages_sql'])->name('messages-sql'); 282 Route::get('messages-sql', [MsgAnswersController::class, 'messages_sql'])->name('messages-sql');
283 283
284 Route::post('admin-reject-message', [MsgAnswersController::class, 'reject_message'])->name('reject_message');
285 Route::post('admin-send-message', [MsgAnswersController::class, 'send_message'])->name('send_message');
286
284 /* 287 /*
285 * Расписанный подход в описании каждой директорий групп пользователей. 288 * Расписанный подход в описании каждой директорий групп пользователей.
286 */ 289 */
287 // кабинет - группы пользователей 290 // кабинет - группы пользователей
288 Route::get('groups', [GroupsController::class, 'index'])->name('groups'); 291 Route::get('groups', [GroupsController::class, 'index'])->name('groups');
289 // кабинет - добавление форма группы пользователей 292 // кабинет - добавление форма группы пользователей
290 Route::get('groups/add', [GroupsController::class, 'add'])->name('add-group'); 293 Route::get('groups/add', [GroupsController::class, 'add'])->name('add-group');
291 // кабинет - сохранение формы группы пользователей 294 // кабинет - сохранение формы группы пользователей
292 Route::post('groups/add', [GroupsController::class, 'store'])->name('add-group-store'); 295 Route::post('groups/add', [GroupsController::class, 'store'])->name('add-group-store');
293 // кабинет - редактирование форма группы пользователей 296 // кабинет - редактирование форма группы пользователей
294 Route::get('groups/edit/{group}', [GroupsController::class, 'edit'])->name('edit-group'); 297 Route::get('groups/edit/{group}', [GroupsController::class, 'edit'])->name('edit-group');
295 // кабинет - сохранение редактированной формы группы пользователей 298 // кабинет - сохранение редактированной формы группы пользователей
296 Route::post('groups/edit/{group}', [GroupsController::class, 'update'])->name('update-group'); 299 Route::post('groups/edit/{group}', [GroupsController::class, 'update'])->name('update-group');
297 // кабинет - удаление группы пользователей 300 // кабинет - удаление группы пользователей
298 Route::delete('groups/delete/{group}', [GroupsController::class, 'destroy'])->name('delete-group'); 301 Route::delete('groups/delete/{group}', [GroupsController::class, 'destroy'])->name('delete-group');
299 302
300 303
301 // кабинет - список админов 304 // кабинет - список админов
302 Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin'); 305 Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin');
303 306
304 // справочник Позиции 307 // справочник Позиции
305 Route::get('positions', [AdminController::class, 'position'])->name('position'); 308 Route::get('positions', [AdminController::class, 'position'])->name('position');
306 Route::get('positions/add', [AdminController::class, 'position_add'])->name('add-position'); 309 Route::get('positions/add', [AdminController::class, 'position_add'])->name('add-position');
307 Route::post('positions/add', [AdminController::class, 'position_add_save'])->name('add-save-position'); 310 Route::post('positions/add', [AdminController::class, 'position_add_save'])->name('add-save-position');
308 Route::get('positions/edit/{position}', [AdminController::class, 'position_edit'])->name('edit-position'); 311 Route::get('positions/edit/{position}', [AdminController::class, 'position_edit'])->name('edit-position');
309 Route::post('position/edit/{position}', [AdminController::class, 'position_update'])->name('update-position'); 312 Route::post('position/edit/{position}', [AdminController::class, 'position_update'])->name('update-position');
310 Route::get('position/delete/{position}', [AdminController::class, 'position_delete'])->name('delete-position'); 313 Route::get('position/delete/{position}', [AdminController::class, 'position_delete'])->name('delete-position');
311 314
312 /////редактор////// кабинет - редактор сайта//////////////////////// 315 /////редактор////// кабинет - редактор сайта////////////////////////
313 Route::get('editor-site', function() { 316 Route::get('editor-site', function() {
314 return view('admin.editor.index'); 317 return view('admin.editor.index');
315 })->name('editor-site'); 318 })->name('editor-site');
316 319
317 320
318 // кабинет - редактор шапки-футера сайта 321 // кабинет - редактор шапки-футера сайта
319 Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks'); 322 Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks');
320 Route::get('edit-bloks/add', [CompanyController::class, 'editblock_add'])->name('add-block'); 323 Route::get('edit-bloks/add', [CompanyController::class, 'editblock_add'])->name('add-block');
321 Route::post('edit-bloks/add', [CompanyController::class, 'editblock_store'])->name('add-block-store'); 324 Route::post('edit-bloks/add', [CompanyController::class, 'editblock_store'])->name('add-block-store');
322 Route::get('edit-bloks/ajax', [CompanyController::class, 'editblock_ajax'])->name('ajax.block'); 325 Route::get('edit-bloks/ajax', [CompanyController::class, 'editblock_ajax'])->name('ajax.block');
323 Route::get('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_edit'])->name('edit-block'); 326 Route::get('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_edit'])->name('edit-block');
324 Route::put('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_update'])->name('update-block'); 327 Route::put('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_update'])->name('update-block');
325 Route::delete('edit-bloks/delete/{block}', [CompanyController::class, 'editblock_destroy'])->name('delete-block'); 328 Route::delete('edit-bloks/delete/{block}', [CompanyController::class, 'editblock_destroy'])->name('delete-block');
326 329
327 330
328 // кабинет - редактор должности на главной 331 // кабинет - редактор должности на главной
329 Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main'); 332 Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main');
330 333
331 // кабинет - счетчики на главной 334 // кабинет - счетчики на главной
332 Route::get('counters-main', [CompanyController::class, 'counters_main'])->name('counters-main'); 335 Route::get('counters-main', [CompanyController::class, 'counters_main'])->name('counters-main');
333 Route::post('counters-main/edit/{name}', [CompanyController::class, 'counters_main_update'])->name('counters-main-update'); 336 Route::post('counters-main/edit/{name}', [CompanyController::class, 'counters_main_update'])->name('counters-main-update');
334 337
335 // кабинет - редактор работодатели на главной 338 // кабинет - редактор работодатели на главной
336 Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main'); 339 Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main');
337 340
338 341
339 // кабинет - редактор seo-сайта 342 // кабинет - редактор seo-сайта
340 Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo'); 343 Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo');
341 Route::get('editor-seo/add', [CompanyController::class, 'editor_seo_add'])->name('add-seo'); 344 Route::get('editor-seo/add', [CompanyController::class, 'editor_seo_add'])->name('add-seo');
342 Route::post('editor-seo/add', [CompanyController::class, 'editor_seo_store'])->name('add-seo-store'); 345 Route::post('editor-seo/add', [CompanyController::class, 'editor_seo_store'])->name('add-seo-store');
343 Route::get('editor-seo/ajax', [CompanyController::class, 'editor_seo_ajax'])->name('ajax.seo'); 346 Route::get('editor-seo/ajax', [CompanyController::class, 'editor_seo_ajax'])->name('ajax.seo');
344 Route::get('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_edit'])->name('edit-seo'); 347 Route::get('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_edit'])->name('edit-seo');
345 Route::put('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_update'])->name('update-seo'); 348 Route::put('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_update'])->name('update-seo');
346 Route::delete('editor-seo/delete/{page}', [CompanyController::class, 'editor_seo_destroy'])->name('delete-seo'); 349 Route::delete('editor-seo/delete/{page}', [CompanyController::class, 'editor_seo_destroy'])->name('delete-seo');
347 350
348 351
349 // кабинет - редактор страниц 352 // кабинет - редактор страниц
350 Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages'); 353 Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages');
351 // кабинет - добавление страницы 354 // кабинет - добавление страницы
352 Route::get('editor-pages/add', [CompanyController::class, 'editor_pages_add'])->name('add-page'); 355 Route::get('editor-pages/add', [CompanyController::class, 'editor_pages_add'])->name('add-page');
353 // кабинет - сохранение формы страницы 356 // кабинет - сохранение формы страницы
354 Route::post('editor-page/add', [CompanyController::class, 'editor_pages_store'])->name('add-page-store'); 357 Route::post('editor-page/add', [CompanyController::class, 'editor_pages_store'])->name('add-page-store');
355 // кабинет - редактирование форма страницы 358 // кабинет - редактирование форма страницы
356 Route::get('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_edit'])->name('edit-page'); 359 Route::get('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_edit'])->name('edit-page');
357 // кабинет - сохранение редактированной формы страницы 360 // кабинет - сохранение редактированной формы страницы
358 Route::put('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_update'])->name('update-page'); 361 Route::put('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_update'])->name('update-page');
359 // кабинет - удаление страницы 362 // кабинет - удаление страницы
360 Route::delete('editor-pages/delete/{page}', [CompanyController::class, 'editor_pages_destroy'])->name('delete-page'); 363 Route::delete('editor-pages/delete/{page}', [CompanyController::class, 'editor_pages_destroy'])->name('delete-page');
361 364
362 365
363 // кабинет - реклама сайта 366 // кабинет - реклама сайта
364 Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames'); 367 Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames');
365 Route::get('reclames/add', [CompanyController::class, 'reclames_add'])->name('add-reclames'); 368 Route::get('reclames/add', [CompanyController::class, 'reclames_add'])->name('add-reclames');
366 Route::post('reclames/add', [CompanyController::class, 'reclames_store'])->name('add-reclames-store'); 369 Route::post('reclames/add', [CompanyController::class, 'reclames_store'])->name('add-reclames-store');
367 Route::get('reclames/edit/{reclame}', [CompanyController::class, 'reclames_edit'])->name('edit-reclames'); 370 Route::get('reclames/edit/{reclame}', [CompanyController::class, 'reclames_edit'])->name('edit-reclames');
368 Route::put('reclames/edit/{reclame}', [CompanyController::class, 'reclames_update'])->name('update-reclames'); 371 Route::put('reclames/edit/{reclame}', [CompanyController::class, 'reclames_update'])->name('update-reclames');
369 Route::delete('reclames/delete/{reclame}', [CompanyController::class, 'reclames_destroy'])->name('delete-reclames'); 372 Route::delete('reclames/delete/{reclame}', [CompanyController::class, 'reclames_destroy'])->name('delete-reclames');
370 //////////////////////////////////////////////////////////////////////// 373 ////////////////////////////////////////////////////////////////////////
371 374
372 375
373 // кабинет - отзывы о работодателе для модерации 376 // кабинет - отзывы о работодателе для модерации
374 Route::get('answers', [EmployersController::class, 'answers'])->name('answers'); 377 Route::get('answers', [EmployersController::class, 'answers'])->name('answers');
375 378
376 // Общая страница статистики 379 // Общая страница статистики
377 Route::get('statics', function () { 380 Route::get('statics', function () {
378 return view('admin.static.index'); 381 return view('admin.static.index');
379 })->name('statics'); 382 })->name('statics');
380 383
381 // кабинет - статистика работников 384 // кабинет - статистика работников
382 Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers'); 385 Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers');
383 386
384 // кабинет - статистика вакансий работодателя 387 // кабинет - статистика вакансий работодателя
385 Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads'); 388 Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads');
386 389
387 // кабинет - справочник - блоки информации (дипломы и документы) для резюме работника 390 // кабинет - справочник - блоки информации (дипломы и документы) для резюме работника
388 /* 391 /*
389 * CRUD-операции над справочником дипломы и документы 392 * CRUD-операции над справочником дипломы и документы
390 */ 393 */
391 //Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks'); 394 //Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks');
392 Route::resource('infobloks', InfoBloksController::class, ['except' => ['show']]); 395 Route::resource('infobloks', InfoBloksController::class, ['except' => ['show']]);
393 396
394 // кабинет - роли пользователя 397 // кабинет - роли пользователя
395 Route::get('roles', [UsersController::class, 'roles'])->name('roles'); 398 Route::get('roles', [UsersController::class, 'roles'])->name('roles');
396 399
397 Route::get('admin_roles', [UsersController::class, 'admin_roles'])->name('admin_roles'); 400 Route::get('admin_roles', [UsersController::class, 'admin_roles'])->name('admin_roles');
398 401
399 Route::get('logs', function() { 402 Route::get('logs', function() {
400 $files = Storage::files('logs/laravel.log'); 403 $files = Storage::files('logs/laravel.log');
401 })->name('logs'); 404 })->name('logs');
402 }); 405 });
403 406
404 // Инструментальные страницы 407 // Инструментальные страницы
405 Route::post('ckeditor/upload', [CKEditorController::class, 'upload'])->name('ckeditor.image-upload'); 408 Route::post('ckeditor/upload', [CKEditorController::class, 'upload'])->name('ckeditor.image-upload');
406 409
407 Route::get('redis/', [PagesController::class, 'redis'])->name('redis'); 410 Route::get('redis/', [PagesController::class, 'redis'])->name('redis');
408 411
409 Route::get('excel/', [PagesController::class, 'excel'])->name('excel'); 412 Route::get('excel/', [PagesController::class, 'excel'])->name('excel');
410 413
411 // Страницы с произвольным контентом 414 // Страницы с произвольным контентом
412 Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page'); 415 Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page');
413 416
414 // Форма обратной связи 417 // Форма обратной связи
415 Route::post('form_feedback', [PagesController::class, 'form_feedback'])->name('form_feedback'); 418 Route::post('form_feedback', [PagesController::class, 'form_feedback'])->name('form_feedback');
416 419
417 // Публичные страницы соискателя 420 // Публичные страницы соискателя
418 Route::get('workers/profile/{worker}', [WorkerController::class, 'profile'])->name('worker_page'); 421 Route::get('workers/profile/{worker}', [WorkerController::class, 'profile'])->name('worker_page');
419 422
420 //Страница вакансии 423 //Страница вакансии
421 Route::get('employer/ad/{ad_employer}', [AdEmployerController::class, 'ad_employer'])->name('ad-employer'); 424 Route::get('employer/ad/{ad_employer}', [AdEmployerController::class, 'ad_employer'])->name('ad-employer');
422 425
423 //Вакансии 426 //Вакансии
424 Route::get('vacancies', [MainController::class, 'vacancies'])->name('vacancies'); 427 Route::get('vacancies', [MainController::class, 'vacancies'])->name('vacancies');
425 428
426 //Вакансии поиск на главной 429 //Вакансии поиск на главной
427 Route::get('search-vacancies', [MainController::class, 'search_vacancies'])->name('search_vacancies'); 430 Route::get('search-vacancies', [MainController::class, 'search_vacancies'])->name('search_vacancies');
428 431
429 //Вакансии категория детальная 432 //Вакансии категория детальная
430 Route::get('list-vacancies/{categories?}', [MainController::class, 'list_vacancies'])->name('list-vacancies'); 433 Route::get('list-vacancies/{categories?}', [MainController::class, 'list_vacancies'])->name('list-vacancies');
431 434
432 // Лайк вакансии 435 // Лайк вакансии
433 Route::get('like-vacancy', [MainController::class, 'like_vacancy'])->name('like-vacancy'); 436 Route::get('like-vacancy', [MainController::class, 'like_vacancy'])->name('like-vacancy');
434 437
435 //Детальная страница вакансии - работодателя 438 //Детальная страница вакансии - работодателя
436 Route::get('vacancie/{vacancy}', [FrontEmployersController::class, 'vacancie'])->name('vacancie'); 439 Route::get('vacancie/{vacancy}', [FrontEmployersController::class, 'vacancie'])->name('vacancie');
437 440
438 //Судоходные компании 441 //Судоходные компании
439 Route::get('shipping-companies', [FrontCompanyController::class, 'shipping_companies'])->name('shipping_companies'); 442 Route::get('shipping-companies', [FrontCompanyController::class, 'shipping_companies'])->name('shipping_companies');
440 443
441 //Детальная инфа о компании 444 //Детальная инфа о компании
442 Route::get('info-company/{company}', [FrontCompanyController::class, 'info_company'])->name('info_company'); 445 Route::get('info-company/{company}', [FrontCompanyController::class, 'info_company'])->name('info_company');
443 446
444 //Образование 447 //Образование
445 Route::get('education', [EducationFrontController::class, 'index'])->name('education'); 448 Route::get('education', [EducationFrontController::class, 'index'])->name('education');
446 Route::get('education/{education}', [EducationFrontController::class, 'show'])->name('show_education')->where('education', '[0-9]+');; 449 Route::get('education/{education}', [EducationFrontController::class, 'show'])->name('show_education')->where('education', '[0-9]+');;
447 450
448 //Новости 451 //Новости
449 Route::get('news', [MainController::class, 'news'])->name('news'); 452 Route::get('news', [MainController::class, 'news'])->name('news');
450 Route::get('detail-new/{new}', [MainController::class, 'detail_new'])->name('detail_new'); 453 Route::get('detail-new/{new}', [MainController::class, 'detail_new'])->name('detail_new');
451 454
452 //Контакты 455 //Контакты
453 Route::get('contacts', [MainController::class, 'contacts'])->name('contacts'); 456 Route::get('contacts', [MainController::class, 'contacts'])->name('contacts');
454 457
455 //База резюме 458 //База резюме
456 Route::get('bd-resume', [WorkerController::class, 'bd_resume'])->name('bd_resume'); 459 Route::get('bd-resume', [WorkerController::class, 'bd_resume'])->name('bd_resume');
457 Route::get('bd_resume_danger', function(){ 460 Route::get('bd_resume_danger', function(){
458 return view('employers.bd_resume_danger'); 461 return view('employers.bd_resume_danger');
459 })->name('bd_resume_danger'); 462 })->name('bd_resume_danger');
460 463
461 Route::get('like-resume', [MainController::class, 'like_worker'])->name('like_resume'); 464 Route::get('like-resume', [MainController::class, 'like_worker'])->name('like_resume');
462 465
463 //Анкета соискателя 466 //Анкета соискателя
464 Route::get('resume-profile/{worker}', [WorkerController::class, 'resume_profile'])->name('resume_profile'); 467 Route::get('resume-profile/{worker}', [WorkerController::class, 'resume_profile'])->name('resume_profile');
465 468
466 //Скачать резюме 469 //Скачать резюме
467 Route::get('resume-download/{worker}', [WorkerController::class, 'resume_download'])->name('resume_download'); 470 Route::get('resume-download/{worker}', [WorkerController::class, 'resume_download'])->name('resume_download');
468 Route::get('resume-download/all', [WorkerController::class, 'resume_download_all'])->name('resume_download_all2'); 471 Route::get('resume-download/all', [WorkerController::class, 'resume_download_all'])->name('resume_download_all2');
469 Route::get('resume-download', [WorkerController::class, 'resume_download_all'])->name('resume_download_all'); 472 Route::get('resume-download', [WorkerController::class, 'resume_download_all'])->name('resume_download_all');
470 473
471 474
472 //Вход в кабинет 475 //Вход в кабинет
473 Route::get('login', [MainController::class, 'input_login'])->name('login'); 476 Route::get('login', [MainController::class, 'input_login'])->name('login');
474 477
475 // Выход из кабинета 478 // Выход из кабинета
476 Route::get('logout', [EmployerController::class, 'logout'])->name('logout'); 479 Route::get('logout', [EmployerController::class, 'logout'])->name('logout');
477 480
478 Route::get( 'register_worker', [WorkerController::class, 'register_worker'])->name('register_worker'); 481 Route::get( 'register_worker', [WorkerController::class, 'register_worker'])->name('register_worker');
479 Route::get('register_employer', [EmployerController::class, 'register_employer'])->name('register_employer'); 482 Route::get('register_employer', [EmployerController::class, 'register_employer'])->name('register_employer');
480 483
481 //восстановление пароля 484 //восстановление пароля
482 Route::get('repair-password', [MainController::class, 'repair_password'])->name('repair_password'); 485 Route::get('repair-password', [MainController::class, 'repair_password'])->name('repair_password');
483 // Звезда сообщения 486 // Звезда сообщения
484 Route::post('stars-answer', [WorkerController::class, 'stars_answer'])->name('stars_answer'); 487 Route::post('stars-answer', [WorkerController::class, 'stars_answer'])->name('stars_answer');
485 488
486 // Борьба 489 // Борьба
487 Route::get('clear_cookie', function() { 490 Route::get('clear_cookie', function() {
488 \App\Classes\Cookies_vacancy::clear_vacancy(); 491 \App\Classes\Cookies_vacancy::clear_vacancy();
489 return redirect()->route('index'); 492 return redirect()->route('index');
490 })->name('clear_cookie'); 493 })->name('clear_cookie');
491 494
492 Route::get('cookies', function() { 495 Route::get('cookies', function() {
493 return view('cookies'); 496 return view('cookies');
494 })->name('cookies'); 497 })->name('cookies');
495 498
496 // Личный кабинет работник 499 // Личный кабинет работник
497 Route::group([ 500 Route::group([
498 'as' => 'worker.', // имя маршрута, например auth.index 501 'as' => 'worker.', // имя маршрута, например auth.index
499 'prefix' => 'worker', // префикс маршрута, например auth/index 502 'prefix' => 'worker', // префикс маршрута, например auth/index
500 'middleware' => ['auth'], ['is_worker'], 503 'middleware' => ['auth'], ['is_worker'],
501 ], function() { 504 ], function() {
502 // Формы редактирования 505 // Формы редактирования
503 Route::get('cabinet/basic_information', [WorkerController::class, 'basic_information'])->name('basic_information'); 506 Route::get('cabinet/basic_information', [WorkerController::class, 'basic_information'])->name('basic_information');
504 Route::get('cabinet/additional_documents', [WorkerController::class, 'additional_documents'])->name('additional_documents'); 507 Route::get('cabinet/additional_documents', [WorkerController::class, 'additional_documents'])->name('additional_documents');
505 508
506 // 1 страница - Моя анкета 509 // 1 страница - Моя анкета
507 Route::get('cabinet', [WorkerController::class, 'cabinet'])->name('cabinet'); 510 Route::get('cabinet', [WorkerController::class, 'cabinet'])->name('cabinet');
508 Route::post('cabinet/{worker}', [WorkerController::class, 'cabinet_save'])->name('cabinet_save'); 511 Route::post('cabinet/{worker}', [WorkerController::class, 'cabinet_save'])->name('cabinet_save');
509 Route::post('cabinet/cabinet_save_foto/{worker}', [WorkerController::class, 'cabinet_save_foto'])->name('cabinet_save_foto'); 512 Route::post('cabinet/cabinet_save_foto/{worker}', [WorkerController::class, 'cabinet_save_foto'])->name('cabinet_save_foto');
510 513
511 514
512 // 2 страница - Сообщения 515 // 2 страница - Сообщения
513 Route::get('cabinet/messages/{type_message}', [WorkerController::class, 'messages'])->name('messages'); 516 Route::get('cabinet/messages/{type_message}', [WorkerController::class, 'messages'])->name('messages');
514 Route::get('cabinet/dialog/{user1}/{user2}', [WorkerController::class, 'dialog'])->name('dialog'); 517 Route::get('cabinet/dialog/{user1}/{user2}', [WorkerController::class, 'dialog'])->name('dialog');
515 // 3 страница - Избранные вакансии 518 // 3 страница - Избранные вакансии
516 Route::get('cabinet/favorite', [WorkerController::class, 'favorite'])->name('favorite'); 519 Route::get('cabinet/favorite', [WorkerController::class, 'favorite'])->name('favorite');
517 // Продолжение борьбы против колорадов - избранные вакансии 520 // Продолжение борьбы против колорадов - избранные вакансии
518 Route::get('кабинет/favorite', [WorkerController::class, 'colorado'])->name('colorado'); 521 Route::get('кабинет/favorite', [WorkerController::class, 'colorado'])->name('colorado');
519 522
520 // 4 страница - Сменить пароль 523 // 4 страница - Сменить пароль
521 Route::get('кабинет/new_password', [WorkerController::class, 'new_password'])->name('new_password'); 524 Route::get('кабинет/new_password', [WorkerController::class, 'new_password'])->name('new_password');
522 Route::post('кабинет/new_password/save', [WorkerController::class, 'save_new_password'])->name('save_new_password'); 525 Route::post('кабинет/new_password/save', [WorkerController::class, 'save_new_password'])->name('save_new_password');
523 526
524 // 5 страница - Удалить профиль 527 // 5 страница - Удалить профиль
525 Route::get('кабинет/delete_profile', [WorkerController::class, 'delete_profile'])->name('delete_profile'); 528 Route::get('кабинет/delete_profile', [WorkerController::class, 'delete_profile'])->name('delete_profile');
526 Route::post('кабинет/delete_profile/delete', [WorkerController::class, 'delete_profile_result'])->name('deleteprofile_result'); 529 Route::post('кабинет/delete_profile/delete', [WorkerController::class, 'delete_profile_result'])->name('deleteprofile_result');
527 530
528 // Резюме -pdf 531 // Резюме -pdf
529 Route::get('кабинет/download/{worker}', [WorkerController::class, 'download'])->name('download'); 532 Route::get('кабинет/download/{worker}', [WorkerController::class, 'download'])->name('download');
530 533
531 // Поднятие анкеты 534 // Поднятие анкеты
532 Route::get('кабинет/up/{worker}', [WorkerController::class, 'up'])->name('up'); 535 Route::get('кабинет/up/{worker}', [WorkerController::class, 'up'])->name('up');
533 536
534 Route::post('test123', [WorkerController::class, 'test123'])->name('test123'); 537 Route::post('test123', [WorkerController::class, 'test123'])->name('test123');
535 538
536 // Добавление сертификата 539 // Добавление сертификата
537 Route::get('кабинет/new_sertificate/{worker}', [WorkerController::class, 'new_sertificate'])->name('new_sertificate'); 540 Route::get('кабинет/new_sertificate/{worker}', [WorkerController::class, 'new_sertificate'])->name('new_sertificate');
538 Route::post('кабинет/add_sertificate', [WorkerController::class, 'add_serificate'])->name('add_serificate'); 541 Route::post('кабинет/add_sertificate', [WorkerController::class, 'add_serificate'])->name('add_serificate');
539 Route::get('кабинет/edit_sertificate/{worker}/{doc}', [WorkerController::class, 'edit_sertificate'])->name('edit_sertificate'); 542 Route::get('кабинет/edit_sertificate/{worker}/{doc}', [WorkerController::class, 'edit_sertificate'])->name('edit_sertificate');
540 Route::get('кабинет/edit_sertificate/{doc}', [WorkerController::class, 'update_serificate'])->name('update_serificate'); 543 Route::get('кабинет/edit_sertificate/{doc}', [WorkerController::class, 'update_serificate'])->name('update_serificate');
541 Route::get('кабинет/delete_sertificate/{doc}', [WorkerController::class, 'delete_sertificate'])->name('delete_sertificate'); 544 Route::get('кабинет/delete_sertificate/{doc}', [WorkerController::class, 'delete_sertificate'])->name('delete_sertificate');
542 545
543 // Добавление предыдущих контактов компании 546 // Добавление предыдущих контактов компании
544 Route::get('кабинет/prev_company/{worker}', [WorkerController::class, 'new_prev_company'])->name('new_prev_company'); 547 Route::get('кабинет/prev_company/{worker}', [WorkerController::class, 'new_prev_company'])->name('new_prev_company');
545 Route::post('кабинет/add_prev_company', [WorkerController::class, 'add_prev_company'])->name('add_prev_company'); 548 Route::post('кабинет/add_prev_company', [WorkerController::class, 'add_prev_company'])->name('add_prev_company');
546 Route::get('кабинет/edit_prev_company/{doc}/{worker}', [WorkerController::class, 'edit_prev_company'])->name('edit_prev_company'); 549 Route::get('кабинет/edit_prev_company/{doc}/{worker}', [WorkerController::class, 'edit_prev_company'])->name('edit_prev_company');
547 Route::post('кабинет/update_prev_company/{doc}', [WorkerController::class, 'update_prev_company'])->name('update_prev_company'); 550 Route::post('кабинет/update_prev_company/{doc}', [WorkerController::class, 'update_prev_company'])->name('update_prev_company');
548 Route::get('кабинет/delete_prev_company/{doc}', [WorkerController::class, 'delete_prev_company'])->name('delete_prev_company'); 551 Route::get('кабинет/delete_prev_company/{doc}', [WorkerController::class, 'delete_prev_company'])->name('delete_prev_company');
549 552
550 // Добавление документа-диплома 553 // Добавление документа-диплома
551 Route::get('кабинет/add_diplom/{worker}', [WorkerController::class, 'add_diplom'])->name('add_diplom'); 554 Route::get('кабинет/add_diplom/{worker}', [WorkerController::class, 'add_diplom'])->name('add_diplom');
552 Route::post('кабинет/add_diplom', [WorkerController::class, 'add_diplom_save'])->name('dop_info_save'); 555 Route::post('кабинет/add_diplom', [WorkerController::class, 'add_diplom_save'])->name('dop_info_save');
553 Route::put('кабинет/edit_diploms/{worker}', [WorkerController::class, 'edit_diploms'])->name('edit_diploms'); 556 Route::put('кабинет/edit_diploms/{worker}', [WorkerController::class, 'edit_diploms'])->name('edit_diploms');
554 Route::get('кабинет/delete_ad_diplom/{worker}', [WorkerController::class, 'delete_add_diplom'])->name('delete_add_diplom'); 557 Route::get('кабинет/delete_ad_diplom/{worker}', [WorkerController::class, 'delete_add_diplom'])->name('delete_add_diplom');
555 558
556 // Добавление стандартного диплома 559 // Добавление стандартного диплома
557 Route::get('кабинет/add_document/{worker}', [WorkerController::class, 'add_document'])->name('add_document'); 560 Route::get('кабинет/add_document/{worker}', [WorkerController::class, 'add_document'])->name('add_document');
558 Route::post('кабинет/add_document/', [WorkerController::class, 'add_document_save'])->name('add_document_save'); 561 Route::post('кабинет/add_document/', [WorkerController::class, 'add_document_save'])->name('add_document_save');
559 Route::get('кабинет/edit_document/{doc}/{worker}', [WorkerController::class, 'edit_document'])->name('edit_document'); 562 Route::get('кабинет/edit_document/{doc}/{worker}', [WorkerController::class, 'edit_document'])->name('edit_document');
560 Route::post('кабинет/edit_document/{doc}', [WorkerController::class, 'edit_document_save'])->name('edit_document_save'); 563 Route::post('кабинет/edit_document/{doc}', [WorkerController::class, 'edit_document_save'])->name('edit_document_save');
561 Route::get('кабинет/delete_document/{doc}', [WorkerController::class, 'delete_document'])->name('delete_document'); 564 Route::get('кабинет/delete_document/{doc}', [WorkerController::class, 'delete_document'])->name('delete_document');
562 565
563 // Отправка сообщения работодателю от соискателя 566 // Отправка сообщения работодателю от соискателя
564 Route::post('сообщение/', [WorkerController::class, 'new_message'])->name('new_message'); 567 Route::post('сообщение/', [WorkerController::class, 'new_message'])->name('new_message');
565 }); 568 });
566 569
567 // Личный кабинет работодателя 570 // Личный кабинет работодателя
568 Route::group([ 571 Route::group([
569 'as' => 'employer.', // имя маршрута, например auth.index 572 'as' => 'employer.', // имя маршрута, например auth.index
570 'prefix' => 'employer', // префикс маршрута, например auth/index 573 'prefix' => 'employer', // префикс маршрута, например auth/index
571 'middleware' => ['auth'], !['is_worker'], 574 'middleware' => ['auth'], !['is_worker'],
572 ], function() { 575 ], function() {
573 // 0 страница - Личные данные работодателя 576 // 0 страница - Личные данные работодателя
574 Route::get('cabinet/employer_info', [EmployerController::class, 'employer_info'])->name('employer_info'); 577 Route::get('cabinet/employer_info', [EmployerController::class, 'employer_info'])->name('employer_info');
575 Route::post('cabinet/employer_info/{user}', [EmployerController::class, 'employer_info_save'])->name('employer_info_save'); 578 Route::post('cabinet/employer_info/{user}', [EmployerController::class, 'employer_info_save'])->name('employer_info_save');
576 579
577 // 1 страница - Профиль 580 // 1 страница - Профиль
578 Route::get('cabinet', [EmployerController::class, 'cabinet'])->name('cabinet'); 581 Route::get('cabinet', [EmployerController::class, 'cabinet'])->name('cabinet');
579 Route::post('cabinet/{Employer}', [EmployerController::class, 'cabinet_save'])->name('cabinet_save'); 582 Route::post('cabinet/{Employer}', [EmployerController::class, 'cabinet_save'])->name('cabinet_save');
580 Route::post('flot_add_ajax', [EmployerController::class, 'save_add_flot'])->name('save_add_flot'); 583 Route::post('flot_add_ajax', [EmployerController::class, 'save_add_flot'])->name('save_add_flot');
581 Route::get('flot_delete_ajax/{Flot}', [EmployerController::class, 'delete_flot'])->name('delete_flot'); 584 Route::get('flot_delete_ajax/{Flot}', [EmployerController::class, 'delete_flot'])->name('delete_flot');
582 Route::get('cabinet/flot_edit/{Flot}/{Employer}', [EmployerController::class, 'edit_flot'])->name('edit_flot'); 585 Route::get('cabinet/flot_edit/{Flot}/{Employer}', [EmployerController::class, 'edit_flot'])->name('edit_flot');
583 Route::post('cabinet/flot_edit/{Flot}', [EmployerController::class, 'update_flot'])->name('update_flot_save'); 586 Route::post('cabinet/flot_edit/{Flot}', [EmployerController::class, 'update_flot'])->name('update_flot_save');
584 Route::get('cabinet/flot', [EmployerController::class, 'slider_flot'])->name('slider_flot'); 587 Route::get('cabinet/flot', [EmployerController::class, 'slider_flot'])->name('slider_flot');
585 588
586 // 2 страница - Добавление вакансий 589 // 2 страница - Добавление вакансий
587 Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie'); 590 Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie');
588 Route::post('vacancie', [EmployerController::class, 'cabinet_vacancy_save1'])->name('vac_save'); 591 Route::post('vacancie', [EmployerController::class, 'cabinet_vacancy_save1'])->name('vac_save');
589 Route::get('cabinet/vacancie_danger', [EmployerController::class, 'cabinet_vacancie_danger'])->name('cabinet_vacancie_danger'); 592 Route::get('cabinet/vacancie_danger', [EmployerController::class, 'cabinet_vacancie_danger'])->name('cabinet_vacancie_danger');
590 593
591 594
592 Route::get('selected_people', [EmployerController::class, 'selected_people'])->name('selected_people'); 595 Route::get('selected_people', [EmployerController::class, 'selected_people'])->name('selected_people');
593 596
594 // 3 страница - Мои вакансии 597 // 3 страница - Мои вакансии
595 Route::get('cabinet/vacancy_list', [EmployerController::class, 'vacancy_list'])->name('vacancy_list'); 598 Route::get('cabinet/vacancy_list', [EmployerController::class, 'vacancy_list'])->name('vacancy_list');
596 Route::get('cabinet/vacancy/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); 599 Route::get('cabinet/vacancy/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit');
597 Route::get('cabinet/vacancy-delete/{ad_employer}', [EmployerController::class, 'vacancy_delete'])->name('vacancy_delete'); 600 Route::get('cabinet/vacancy-delete/{ad_employer}', [EmployerController::class, 'vacancy_delete'])->name('vacancy_delete');
598 Route::get('cabinet/vacancy-up/{ad_employer}', [EmployerController::class, 'vacancy_up'])->name('vacancy_up'); 601 Route::get('cabinet/vacancy-up/{ad_employer}', [EmployerController::class, 'vacancy_up'])->name('vacancy_up');
599 Route::get('cabinet/vacancy-eye/{ad_employer}/{status}', [EmployerController::class, 'vacancy_eye'])->name('vacancy_eye'); 602 Route::get('cabinet/vacancy-eye/{ad_employer}/{status}', [EmployerController::class, 'vacancy_eye'])->name('vacancy_eye');
600 Route::get('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); 603 Route::get('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit');
601 Route::post('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_save_me'])->name('vacancy_save_me'); 604 Route::post('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_save_me'])->name('vacancy_save_me');
602 605
603 // 4.1Ю. 606 // 4.1Ю.
604 Route::get('cabinet/ad_jobs/create/{ad_employer}', [Ad_jobsController::class, 'add_job_in_vac'])->name('add_job_in_vac'); 607 Route::get('cabinet/ad_jobs/create/{ad_employer}', [Ad_jobsController::class, 'add_job_in_vac'])->name('add_job_in_vac');
605 Route::post('cabinet/ad_jobs/create', [Ad_jobsController::class, 'add_job_in_vac_save'])->name('add_job_in_vac_save'); 608 Route::post('cabinet/ad_jobs/create', [Ad_jobsController::class, 'add_job_in_vac_save'])->name('add_job_in_vac_save');
606 Route::get('cabinet/ad_jobs/edit/{ad_job}/{ad_employer}', [Ad_jobsController::class, 'edit_job_in_vac'])->name('edit_job_in_vac'); 609 Route::get('cabinet/ad_jobs/edit/{ad_job}/{ad_employer}', [Ad_jobsController::class, 'edit_job_in_vac'])->name('edit_job_in_vac');
607 Route::post('cabinet/ad_jobs/edit/{ad_job}', [Ad_jobsController::class, 'edit_job_in_vac_save'])->name('edit_job_in_vac_save'); 610 Route::post('cabinet/ad_jobs/edit/{ad_job}', [Ad_jobsController::class, 'edit_job_in_vac_save'])->name('edit_job_in_vac_save');
608 Route::get('cabinet/ad_jobs/delete/{ad_job}', [Ad_jobsController::class, 'delete_job_in_vac'])->name('delete_job_in_vac'); 611 Route::get('cabinet/ad_jobs/delete/{ad_job}', [Ad_jobsController::class, 'delete_job_in_vac'])->name('delete_job_in_vac');
609 612
610 // 4 страница - Отклики на вакансии 613 // 4 страница - Отклики на вакансии
611 Route::get('cabinet/answers/{employer}', [EmployerController::class, 'answers'])->name('answers'); 614 Route::get('cabinet/answers/{employer}', [EmployerController::class, 'answers'])->name('answers');
612 Route::get('cabinet/status/{employer}', [EmployerController::class, 'supple_status2'])->name('supple'); 615 Route::get('cabinet/status/{employer}', [EmployerController::class, 'supple_status2'])->name('supple');
613 Route::get('status/{employer}/{ad_response}/{flag}', [EmployerController::class, 'supple_status'])->name('status_msg'); 616 Route::get('status/{employer}/{ad_response}/{flag}', [EmployerController::class, 'supple_status'])->name('status_msg');
614 617
615 // 5 страница - Сообщения 618 // 5 страница - Сообщения
616 Route::get('cabinet/messages/{type_message}', [EmployerController::class, 'messages'])->name('messages'); 619 Route::get('cabinet/messages/{type_message}', [EmployerController::class, 'messages'])->name('messages');
617 Route::get('cabinet/dialog/{user1}/{user2}', [EmployerController::class, 'dialog'])->name('dialog'); 620 Route::get('cabinet/dialog/{user1}/{user2}', [EmployerController::class, 'dialog'])->name('dialog');
618 Route::post('cabinet/send-message', [EmployerController::class, 'send_message'])->name('send_message'); 621 Route::post('cabinet/send-message', [EmployerController::class, 'send_message'])->name('send_message');
619 Route::post('test123', [EmployerController::class, 'test123'])->name('test123'); 622 Route::post('test123', [EmployerController::class, 'test123'])->name('test123');
620 623
621 // 6 страница - Избранный 624 // 6 страница - Избранный
622 Route::get('cabinet/favorites', [EmployerController::class, 'favorites'])->name('favorites'); 625 Route::get('cabinet/favorites', [EmployerController::class, 'favorites'])->name('favorites');
623 626
624 //7 страница - База данных 627 //7 страница - База данных
625 Route::get('cabinet/bd', [EmployerController::class, 'bd'])->name('bd'); 628 Route::get('cabinet/bd', [EmployerController::class, 'bd'])->name('bd');
626 629
627 //8 страница - База резюме 630 //8 страница - База резюме
628 Route::get('cabinet/bd-tupe', [EmployerController::class, 'bd_tupe'])->name('bd-tupe'); 631 Route::get('cabinet/bd-tupe', [EmployerController::class, 'bd_tupe'])->name('bd-tupe');
629 632
630 // 9 рассылка сообщений 633 // 9 рассылка сообщений
631 Route::get('cabinet/send-all-messages', [EmployerController::class, 'send_all_messages'])->name('send_all_messages'); 634 Route::get('cabinet/send-all-messages', [EmployerController::class, 'send_all_messages'])->name('send_all_messages');
632 Route::post('cabinet/send-all-messages/send', [EmployerController::class, 'send_all_post'])->name('send_all_post'); 635 Route::post('cabinet/send-all-messages/send', [EmployerController::class, 'send_all_post'])->name('send_all_post');
633 636
634 // 10 страница FAQ вопросы 637 // 10 страница FAQ вопросы
635 Route::get('cabinet/faq', [EmployerController::class, 'faq'])->name('faq'); 638 Route::get('cabinet/faq', [EmployerController::class, 'faq'])->name('faq');
636 639
637 // 11 страница - Настройка уведомлений 640 // 11 страница - Настройка уведомлений
638 Route::get('cabinet/subscribe', [EmployerController::class, 'subscribe'])->name('subscribe'); 641 Route::get('cabinet/subscribe', [EmployerController::class, 'subscribe'])->name('subscribe');
639 Route::get('cabinet/subscribe/save', [EmployerController::class, 'save_subscribe'])->name('save_subscribe'); 642 Route::get('cabinet/subscribe/save', [EmployerController::class, 'save_subscribe'])->name('save_subscribe');
640 643
641 // 12 страница - Сменить пароль 644 // 12 страница - Сменить пароль
642 Route::get('cabinet/password-reset', [EmployerController::class, 'password_reset'])->name('password_reset'); 645 Route::get('cabinet/password-reset', [EmployerController::class, 'password_reset'])->name('password_reset');
643 Route::get('cabinet/password-reset/new', [EmployerController::class, 'new_password'])->name('new_password'); 646 Route::get('cabinet/password-reset/new', [EmployerController::class, 'new_password'])->name('new_password');
644 647
645 // 13 страница - Удаление профиля 648 // 13 страница - Удаление профиля
646 Route::get('cabinet/delete-people', [EmployerController::class, 'delete_people'])->name('delete_people'); 649 Route::get('cabinet/delete-people', [EmployerController::class, 'delete_people'])->name('delete_people');
647 Route::get('cabinet/action-delete-people', [EmployerController::class, 'action_delete_user'])->name('action_delete_user'); 650 Route::get('cabinet/action-delete-people', [EmployerController::class, 'action_delete_user'])->name('action_delete_user');
648 Route::get('cabinet/action-ajax-delete-people', [EmployerController::class, 'ajax_delete_user'])->name('ajax_delete_user'); 651 Route::get('cabinet/action-ajax-delete-people', [EmployerController::class, 'ajax_delete_user'])->name('ajax_delete_user');
649 652
650 // Отправил сообщение 653 // Отправил сообщение
651 Route::post('сообщение/', [EmployerController::class, 'new_message'])->name('new_message'); 654 Route::post('сообщение/', [EmployerController::class, 'new_message'])->name('new_message');
652 655
653 Route::post('pin_chat/', [EmployerController::class, 'pin_chat'])->name('pin_chat'); 656 Route::post('pin_chat/', [EmployerController::class, 'pin_chat'])->name('pin_chat');
654 Route::post('remove_chat/', [EmployerController::class, 'remove_chat'])->name('remove_chat'); 657 Route::post('remove_chat/', [EmployerController::class, 'remove_chat'])->name('remove_chat');
655 }); 658 });
656 659
657 Route::get('TestWorker', [WorkerController::class, 'TestWorker'])->name('TestWorker'); 660 Route::get('TestWorker', [WorkerController::class, 'TestWorker'])->name('TestWorker');
658 661
659 662