Commit 95378625599f82b83f8ac938a29edb6333720874

Authored by Hayk Nazaryan
1 parent 298bab702d
Exists in master

verify workers from admin panel

Showing 3 changed files with 17 additions and 1 deletions Inline Diff

app/Http/Controllers/Admin/WorkersController.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\Http\Requests\WorkerRequest; 6 use App\Http\Requests\WorkerRequest;
7 use App\Models\Company; 7 use App\Models\Company;
8 use App\Models\Job_title; 8 use App\Models\Job_title;
9 use App\Models\Static_worker; 9 use App\Models\Static_worker;
10 use App\Models\User; 10 use App\Models\User;
11 use App\Models\Worker; 11 use App\Models\Worker;
12 use Carbon\Carbon; 12 use Carbon\Carbon;
13 use Illuminate\Database\Eloquent\Builder; 13 use Illuminate\Database\Eloquent\Builder;
14 use Illuminate\Http\Request; 14 use Illuminate\Http\Request;
15 use Illuminate\Support\Facades\Storage; 15 use Illuminate\Support\Facades\Storage;
16 use Illuminate\Support\Facades\Validator; 16 use Illuminate\Support\Facades\Validator;
17 use App\Enums\WorkerStatuses; 17 use App\Enums\WorkerStatuses;
18 18
19 class WorkersController extends Controller 19 class WorkersController extends Controller
20 { 20 {
21 public function index(Request $request) { 21 public function index(Request $request) {
22 if ($request->ajax()) { 22 if ($request->ajax()) {
23 $user = User::find($request->id); 23 $user = User::find($request->id);
24 $request->offsetUnset('id'); 24 $request->offsetUnset('id');
25 $user->update($request->all()); 25 $user->update($request->all());
26 } 26 }
27 27
28 $status_work = Job_title::query()->active()->orderBy('name')->get(); 28 $status_work = Job_title::query()->active()->orderBy('name')->get();
29 $users = User::with(['jobtitles', 'workers'])->realuser(); 29 $users = User::with(['jobtitles', 'workers'])->realuser();
30 $all_worker = $users->count(); 30 $all_worker = $users->count();
31 31
32 $find_status_work = ""; 32 $find_status_work = "";
33 if (isset($request->status_work)) { 33 if (isset($request->status_work)) {
34 $find_status_work = $request->status_work; 34 $find_status_work = $request->status_work;
35 35
36 if ($request->status_work > 0) { 36 if ($request->status_work > 0) {
37 $users = $users-> 37 $users = $users->
38 whereHas('workers', 38 whereHas('workers',
39 function (Builder $query) use ($find_status_work) { 39 function (Builder $query) use ($find_status_work) {
40 $query->where('position_work', $find_status_work); 40 $query->where('position_work', $find_status_work);
41 } 41 }
42 ); 42 );
43 } else { 43 } else {
44 $users = $users->whereHas('workers'); 44 $users = $users->whereHas('workers');
45 } 45 }
46 46
47 } else { 47 } else {
48 $users = $users->whereHas('workers'); 48 $users = $users->whereHas('workers');
49 } 49 }
50 50
51 $find_key = ""; 51 $find_key = "";
52 if (isset($request->find)) { 52 if (isset($request->find)) {
53 $find_key = $request->find; 53 $find_key = $request->find;
54 $users = $users->where(function($query) use($find_key) { 54 $users = $users->where(function($query) use($find_key) {
55 $query->where('name_man', 'LIKE', "%$find_key%") 55 $query->where('name_man', 'LIKE', "%$find_key%")
56 ->orWhere('email', 'LIKE', "%$find_key%") 56 ->orWhere('email', 'LIKE', "%$find_key%")
57 ->orWhere('telephone', 'LIKE', "%$find_key%") 57 ->orWhere('telephone', 'LIKE', "%$find_key%")
58 ->orWhere('surname', 'LIKE', "%$find_key%") 58 ->orWhere('surname', 'LIKE', "%$find_key%")
59 ->orWhere('surname2', 'LIKE', "%$find_key%"); 59 ->orWhere('surname2', 'LIKE', "%$find_key%");
60 }); 60 });
61 } 61 }
62 62
63 $all_worker = $users->count(); 63 $all_worker = $users->count();
64 64
65 $users = $users->orderByDesc('id')->paginate(15); 65 $users = $users->orderByDesc('id')->paginate(15);
66 66
67 $status_wor = WorkerStatuses::getWorkerStatuses(); 67 $status_wor = WorkerStatuses::getWorkerStatuses();
68 68
69 if ($request->ajax()) { 69 if ($request->ajax()) {
70 return view('admin.worker.index_ajax', compact('users', 'status_wor')); 70 return view('admin.worker.index_ajax', compact('users', 'status_wor'));
71 } else { 71 } else {
72 return view('admin.worker.index', compact('users', 72 return view('admin.worker.index', compact('users',
73 'find_key', 73 'find_key',
74 'find_status_work', 74 'find_status_work',
75 'status_work', 75 'status_work',
76 'status_wor', 76 'status_wor',
77 'all_worker')); 77 'all_worker'));
78 } 78 }
79 } 79 }
80 80
81 public function form_add_worker(User $user) { 81 public function form_add_worker(User $user) {
82 $job_titles = Job_title::query()->active()->orderBy('name')->get(); 82 $job_titles = Job_title::query()->active()->orderBy('name')->get();
83 83
84 $time_end_anketa = 'Создана только'; 84 $time_end_anketa = 'Создана только';
85 $long_days = Company::find(1)->time_resume; 85 $long_days = Company::find(1)->time_resume;
86 $time_end_anketa = date("d.m.Y H:i:s", strtotime(Carbon::now() . "+$long_days days")); 86 $time_end_anketa = date("d.m.Y H:i:s", strtotime(Carbon::now() . "+$long_days days"));
87 87
88 return view('admin.worker.add', compact('user', 'job_titles', 'time_end_anketa')); 88 return view('admin.worker.add', compact('user', 'job_titles', 'time_end_anketa'));
89 } 89 }
90 90
91 public function form_store_worker(WorkerRequest $request, User $user) { 91 public function form_store_worker(WorkerRequest $request, User $user) {
92 $params = $request->all(); 92 $params = $request->all();
93 $worker = Worker::create($params); 93 $worker = Worker::create($params);
94 return redirect()->route('admin.basedata'); 94 return redirect()->route('admin.basedata');
95 } 95 }
96 96
97 public function form_edit_worker(Worker $worker) { 97 public function form_edit_worker(Worker $worker) {
98 $job_titles = Job_title::query()->active()->orderBy('name')->get(); 98 $job_titles = Job_title::query()->active()->orderBy('name')->get();
99 99
100 $time_end_anketa = 'Бессрочно'; 100 $time_end_anketa = 'Бессрочно';
101 if (!empty($worker->updated_at)) { 101 if (!empty($worker->updated_at)) {
102 $long_days = Company::find(1)->time_resume; 102 $long_days = Company::find(1)->time_resume;
103 $time_end_anketa = date("d.m.Y H:i:s", strtotime($worker->updated_at . "+$long_days days")); 103 $time_end_anketa = date("d.m.Y H:i:s", strtotime($worker->updated_at . "+$long_days days"));
104 } 104 }
105 return view('admin.worker.edit', compact('worker', 'job_titles', 'time_end_anketa')); 105 return view('admin.worker.edit', compact('worker', 'job_titles', 'time_end_anketa'));
106 } 106 }
107 107
108 public function verify_worker(User $user) {
109 if ($user->id) {
110 $user->update(['email_verified_at' => now()]);
111 }
112
113 return redirect()->back();
114 }
115
108 public function form_update_worker(Request $request, Worker $worker) 116 public function form_update_worker(Request $request, Worker $worker)
109 { 117 {
110 $params = $request->all(); 118 $params = $request->all();
111 119
112 $rules = [ 120 $rules = [
113 'email' => 'email|string|max:255', 121 'email' => 'email|string|max:255',
114 //'photo' => 'mimes:jpeg,jpg,png|max:15000', 122 //'photo' => 'mimes:jpeg,jpg,png|max:15000',
115 ]; 123 ];
116 124
117 $messages = [ 125 $messages = [
118 'required' => 'Укажите обязательное поле «:attribute»', 126 'required' => 'Укажите обязательное поле «:attribute»',
119 'confirmed' => 'Пароли не совпадают', 127 'confirmed' => 'Пароли не совпадают',
120 'email' => 'Введите корректный email', 128 'email' => 'Введите корректный email',
121 'min' => [ 129 'min' => [
122 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 130 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
123 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 131 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
124 ], 132 ],
125 'max' => [ 133 'max' => [
126 'string' => 'Поле «:attribute» должно быть не больше :max символов', 134 'string' => 'Поле «:attribute» должно быть не больше :max символов',
127 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 135 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
128 ], 136 ],
129 ]; 137 ];
130 138
131 $validator = Validator::make($params, $rules, $messages); 139 $validator = Validator::make($params, $rules, $messages);
132 140
133 if ($validator->fails()) { 141 if ($validator->fails()) {
134 return back()->withErrors($validator)->withInput(); 142 return back()->withErrors($validator)->withInput();
135 } else { 143 } else {
136 $user_id = $worker->user_id; 144 $user_id = $worker->user_id;
137 if ($request->has('photo')) { 145 if ($request->has('photo')) {
138 if (!empty($worker->photo)) { 146 if (!empty($worker->photo)) {
139 Storage::delete($worker->photo); 147 Storage::delete($worker->photo);
140 } 148 }
141 if (!empty($request->photo)) 149 if (!empty($request->photo))
142 $params['photo'] = $request->file('photo')->store("workers/$user_id", 'public'); 150 $params['photo'] = $request->file('photo')->store("workers/$user_id", 'public');
143 } 151 }
144 $worker->update($params); 152 $worker->update($params);
145 153
146 return redirect()->route('admin.workers'); 154 return redirect()->route('admin.workers');
147 } 155 }
148 } 156 }
149 157
150 // кабинет - статистика работников 158 // кабинет - статистика работников
151 public function static_workers(Request $request) { 159 public function static_workers(Request $request) {
152 $stat = Static_worker::with('users'); 160 $stat = Static_worker::with('users');
153 //->join('users', 'users.id', '=', 'static_workers.user_id'); 161 //->join('users', 'users.id', '=', 'static_workers.user_id');
154 $users = User::query()->active()->OrderBy('id')->get(); 162 $users = User::query()->active()->OrderBy('id')->get();
155 $periods = Static_worker::query()->distinct('year_month')->select('year_month')->get(); 163 $periods = Static_worker::query()->distinct('year_month')->select('year_month')->get();
156 if ($request->ajax()) { 164 if ($request->ajax()) {
157 if (isset($request->user_id)) 165 if (isset($request->user_id))
158 if (!$request->user_id == "0") 166 if (!$request->user_id == "0")
159 $stat = $stat->Where('user_id', '=', $request->user_id); 167 $stat = $stat->Where('user_id', '=', $request->user_id);
160 if (isset($request->year_month)) { 168 if (isset($request->year_month)) {
161 if (!$request->year_month == "0") 169 if (!$request->year_month == "0")
162 $stat = $stat->Where('year_month', '=', $request->year_month); 170 $stat = $stat->Where('year_month', '=', $request->year_month);
163 } 171 }
164 } 172 }
165 173
166 $stat = $stat->OrderByDesc('year_month'); 174 $stat = $stat->OrderByDesc('year_month');
167 //->OrderBy('users.name'); 175 //->OrderBy('users.name');
168 //OrderBy('users.name')-> 176 //OrderBy('users.name')->
169 /*$stat->implode() loadMissing(['users' => function (Builder $query) { 177 /*$stat->implode() loadMissing(['users' => function (Builder $query) {
170 $query->orderBy('name', 'asc'); 178 $query->orderBy('name', 'asc');
171 }]);*/ 179 }]);*/
172 180
173 $stat = $stat->paginate(15); 181 $stat = $stat->paginate(15);
174 182
175 if ($request->ajax()) 183 if ($request->ajax())
176 return view('admin.static.index_workers_ajax', compact('stat')); 184 return view('admin.static.index_workers_ajax', compact('stat'));
177 else 185 else
178 return view('admin.static.index_workers', compact('stat', 'users', 'periods')); 186 return view('admin.static.index_workers', compact('stat', 'users', 'periods'));
179 187
180 } 188 }
181 189
182 } 190 }
183 191
resources/views/admin/worker/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 $(document).on('click', '.checkban', function () { 6 $(document).on('click', '.checkban', function () {
7 var this_ = $(this); 7 var this_ = $(this);
8 var value = this_.val(); 8 var value = this_.val();
9 var ajax_block = $('#ajax_block'); 9 var ajax_block = $('#ajax_block');
10 var bool = 0; 10 var bool = 0;
11 11
12 if(this.checked){ 12 if(this.checked){
13 bool = 1; 13 bool = 1;
14 } else { 14 } else {
15 bool = 0; 15 bool = 0;
16 } 16 }
17 17
18 $.ajax({ 18 $.ajax({
19 type: "GET", 19 type: "GET",
20 url: "{{ url()->full()}}", 20 url: "{{ url()->full()}}",
21 data: "id=" + value + "&is_ban=" + bool, 21 data: "id=" + value + "&is_ban=" + bool,
22 success: function (data) { 22 success: function (data) {
23 console.log('Обновление таблицы работников '); 23 console.log('Обновление таблицы работников ');
24 //data = JSON.parse(data); 24 //data = JSON.parse(data);
25 console.log(data); 25 console.log(data);
26 ajax_block.html(data); 26 ajax_block.html(data);
27 }, 27 },
28 headers: { 28 headers: {
29 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 29 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
30 }, 30 },
31 error: function (data) { 31 error: function (data) {
32 console.log('Error: ' + data); 32 console.log('Error: ' + data);
33 } 33 }
34 }); 34 });
35 }); 35 });
36 36
37 }); 37 });
38 </script> 38 </script>
39 @endsection 39 @endsection
40 40
41 @section('search') 41 @section('search')
42 @include('admin.find_worker', ['find_status_work' => $find_status_work]) 42 @include('admin.find_worker', ['find_status_work' => $find_status_work])
43 @endsection 43 @endsection
44 44
45 @section('content') 45 @section('content')
46 <div class="grid gap-6 mb-8 md:grid-cols-2 xl:grid-cols-4"> 46 <div class="grid gap-6 mb-8 md:grid-cols-2 xl:grid-cols-4">
47 47
48 <div class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"> 48 <div class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800">
49 <div class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500"> 49 <div class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500">
50 <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> 50 <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
51 <path 51 <path
52 d="M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z"></path> 52 d="M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z"></path>
53 </svg> 53 </svg>
54 </div> 54 </div>
55 <div> 55 <div>
56 <p class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"> 56 <p class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400">
57 Всего соискателей 57 Всего соискателей
58 </p> 58 </p>
59 <p class="text-lg font-semibold text-gray-700 dark:text-gray-200"> 59 <p class="text-lg font-semibold text-gray-700 dark:text-gray-200">
60 {{ $all_worker }} 60 {{ $all_worker }}
61 </p> 61 </p>
62 </div> 62 </div>
63 </div> 63 </div>
64 </div> 64 </div>
65 65
66 <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> 66 <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block">
67 <div class="w-full overflow-x-auto"> 67 <div class="w-full overflow-x-auto">
68 <table class="w-full whitespace-no-wrap"> 68 <table class="w-full whitespace-no-wrap">
69 <thead> 69 <thead>
70 <tr 70 <tr
71 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" 71 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"
72 > 72 >
73 <th class="px-4 py-3">№</th> 73 <th class="px-4 py-3">№</th>
74 <th class="px-4 py-3">Лого</th> 74 <th class="px-4 py-3">Лого</th>
75 <th class="px-4 py-3">ФИО/Email/Телефон/Пароль</th> 75 <th class="px-4 py-3">ФИО/Email/Телефон/Пароль</th>
76 <th class="px-4 py-3">Статус</th> 76 <th class="px-4 py-3">Статус</th>
77 <th class="px-4 py-3">% анкеты</th> 77 <th class="px-4 py-3">% анкеты</th>
78 <th class="px-4 py-3">Должность</th> 78 <th class="px-4 py-3">Должность</th>
79 <th class="px-4 py-3">Дата регистрации</th> 79 <th class="px-4 py-3">Дата регистрации</th>
80 <th class="px-4 py-3">Дата подтверждения</th>
80 <th class="px-4 py-3">Изменить</th> 81 <th class="px-4 py-3">Изменить</th>
81 </tr> 82 </tr>
82 </thead> 83 </thead>
83 <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> 84 <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800">
84 @foreach($users as $user) 85 @foreach($users as $user)
85 @if (!isset($user->workers[0])) 86 @if (!isset($user->workers[0]))
86 @continue(1) 87 @continue(1)
87 @endif 88 @endif
88 <tr class="text-gray-700 dark:text-gray-400"> 89 <tr class="text-gray-700 dark:text-gray-400">
89 <td class="px-4 py-3 text-xs"> 90 <td class="px-4 py-3 text-xs">
90 {{$user->id}} 91 {{$user->id}}
91 </td> 92 </td>
92 <td class="px-4 py-3 text-xs"> 93 <td class="px-4 py-3 text-xs">
93 @if (isset($user->workers[0]->photo)) 94 @if (isset($user->workers[0]->photo))
94 <div class="flex items-center text-sm"> 95 <div class="flex items-center text-sm">
95 <div 96 <div
96 class="relative hidden w-8 h-8 mr-3 rounded-full md:block" 97 class="relative hidden w-8 h-8 mr-3 rounded-full md:block"
97 > 98 >
98 <img 99 <img
99 class="object-cover w-full h-full rounded-full" 100 class="object-cover w-full h-full rounded-full"
100 src="{{ asset(Storage::url($user->workers[0]->photo)) }}" 101 src="{{ asset(Storage::url($user->workers[0]->photo)) }}"
101 alt="" 102 alt=""
102 loading="lazy" 103 loading="lazy"
103 /> 104 />
104 <div 105 <div
105 class="absolute inset-0 rounded-full shadow-inner" 106 class="absolute inset-0 rounded-full shadow-inner"
106 aria-hidden="true" 107 aria-hidden="true"
107 ></div> 108 ></div>
108 </div> 109 </div>
109 </div> 110 </div>
110 @else 111 @else
111 - 112 -
112 @endif 113 @endif
113 </td> 114 </td>
114 115
115 <td class="px-4 py-3 text-xs"> 116 <td class="px-4 py-3 text-xs">
116 <div class="flex items-center text-sm"> 117 <div class="flex items-center text-sm">
117 <div> 118 <div>
118 <p class="font-semibold"> 119 <p class="font-semibold">
119 @if (isset($user->id)) 120 @if (isset($user->id))
120 <a style="text-decoration: underline;" 121 <a style="text-decoration: underline;"
121 href="{{ route('admin.user-profile', ['user' => $user->id]) }}}">{{ $user->surname }} {{ !empty($user->name_man) ? $user->name_man : $user->name }} {{ $user->surname2 }}</a> 122 href="{{ route('admin.user-profile', ['user' => $user->id]) }}}">{{ $user->surname }} {{ !empty($user->name_man) ? $user->name_man : $user->name }} {{ $user->surname2 }}</a>
122 @else 123 @else
123 {{ $user->surname }} {{ !empty($user->name_man) ? $user->name_man : $user->name }} {{ $user->surname2 }} 124 {{ $user->surname }} {{ !empty($user->name_man) ? $user->name_man : $user->name }} {{ $user->surname2 }}
124 @endif 125 @endif
125 </p> 126 </p>
126 {{-- <p class="font-semibold">{{ empty($user->workers->email) ? $user->email : $user->workers->email }}</p>--}} 127 {{-- <p class="font-semibold">{{ empty($user->workers->email) ? $user->email : $user->workers->email }}</p>--}}
127 <p class="font-semibold">{{ $user->email }}</p> 128 <p class="font-semibold">{{ $user->email }}</p>
128 <p class="text-xs text-gray-600 dark:text-gray-400"> 129 <p class="text-xs text-gray-600 dark:text-gray-400">
129 {{ empty($user->workers->telephone) ? $user->telephone : $user->workers->telephone }} 130 {{ empty($user->workers->telephone) ? $user->telephone : $user->workers->telephone }}
130 </p> 131 </p>
131 <p class="text-xs text-gray-600 dark:text-gray-400"> 132 <p class="text-xs text-gray-600 dark:text-gray-400">
132 @if (!empty($user->pubpassword)) 133 @if (!empty($user->pubpassword))
133 {{ base64_decode($user->pubpassword) }} 134 {{ base64_decode($user->pubpassword) }}
134 @endif 135 @endif
135 </p> 136 </p>
136 </div> 137 </div>
137 </div> 138 </div>
138 </td> 139 </td>
139 140
140 <td class="px-4 py-3 text-xs"> 141 <td class="px-4 py-3 text-xs">
141 @if (isset($user->workers[0]->status_work)) 142 @if (isset($user->workers[0]->status_work))
142 {{ $status_wor[$user->workers[0]->status_work] }} 143 {{ $status_wor[$user->workers[0]->status_work] }}
143 @else 144 @else
144 - 145 -
145 @endif 146 @endif
146 </td> 147 </td>
147 148
148 <td class="px-4 py-3 text-xs"> 149 <td class="px-4 py-3 text-xs">
149 <span class="px-2 py-1 font-semibold leading-tight text-orange-700 bg-orange-100 rounded-full @if(($persent = \App\Classes\Tools::getWorkerProfilePercent($user->workers[0])) > 50) dark:bg-green-700 dark:text-green-100 @else dark:text-white dark:bg-orange-600 @endif"> 150 <span class="px-2 py-1 font-semibold leading-tight text-orange-700 bg-orange-100 rounded-full @if(($persent = \App\Classes\Tools::getWorkerProfilePercent($user->workers[0])) > 50) dark:bg-green-700 dark:text-green-100 @else dark:text-white dark:bg-orange-600 @endif">
150 {{ $persent }}% 151 {{ $persent }}%
151 </span> 152 </span>
152 </td> 153 </td>
153 154
154 <td class="px-4 py-3 text-xs"> 155 <td class="px-4 py-3 text-xs">
155 @if ($user->job !== null) 156 @if ($user->job !== null)
156 {{ $user->job }} 157 {{ $user->job }}
157 @else 158 @else
158 Не задана 159 Не задана
159 @endif 160 @endif
160 </td> 161 </td>
161 <td class="px-4 py-3 text-xs"> 162 <td class="px-4 py-3 text-xs">
162 {{ date('d.m.Y h:i:s', strtotime($user->created_at)) }} 163 {{ date('d.m.Y h:i:s', strtotime($user->created_at)) }}
163 </td> 164 </td>
164 <td class="px-4 py-3 text-xs"> 165 <td class="px-4 py-3 text-xs">
166 @if($user->email_verified_at)
167 {{ date('d.m.Y h:i:s', strtotime($user->email_verified_at)) }}
168 @else
169 <a href="{{ route('admin.worker-verify', ['user' => $user->id]) }}" class="text-green-500">Подтвердить</a>
170 @endif
171 </td>
172 <td class="px-4 py-3 text-xs">
165 @if (isset($user->workers[0]->id)) 173 @if (isset($user->workers[0]->id))
166 <a href="{{ route('admin.worker-profile-edit', ['worker' => $user->workers[0]->id]) }}">Изменить</a> 174 <a href="{{ route('admin.worker-profile-edit', ['worker' => $user->workers[0]->id]) }}">Изменить</a>
167
168 @endif 175 @endif
169 </td> 176 </td>
170 </tr> 177 </tr>
171 @endforeach 178 @endforeach
172 </tbody> 179 </tbody>
173 </table> 180 </table>
174 </div> 181 </div>
175 182
176 <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"> 183 <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">
177 <?=$users->appends($_GET)->links('admin.pagginate'); ?> 184 <?=$users->appends($_GET)->links('admin.pagginate'); ?>
178 </div> 185 </div>
179 </div> 186 </div>
180 @endsection 187 @endsection
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\FaqController; 20 use App\Http\Controllers\FaqController;
21 use App\Http\Controllers\MediaController; 21 use App\Http\Controllers\MediaController;
22 use App\Http\Controllers\WorkerController; 22 use App\Http\Controllers\WorkerController;
23 use App\Models\Ad_jobs; 23 use App\Models\Ad_jobs;
24 use App\Models\User; 24 use App\Models\User;
25 use App\Http\Controllers\MainController; 25 use App\Http\Controllers\MainController;
26 use App\Http\Controllers\HomeController; 26 use App\Http\Controllers\HomeController;
27 use Illuminate\Support\Facades\Route; 27 use Illuminate\Support\Facades\Route;
28 use App\Http\Controllers\Admin\CompanyController; 28 use App\Http\Controllers\Admin\CompanyController;
29 use App\Http\Controllers\Admin\Ad_EmployersController; 29 use App\Http\Controllers\Admin\Ad_EmployersController;
30 use App\Http\Controllers\Admin\MsgAnswersController; 30 use App\Http\Controllers\Admin\MsgAnswersController;
31 use App\Http\Controllers\Admin\GroupsController; 31 use App\Http\Controllers\Admin\GroupsController;
32 use App\Http\Controllers\PagesController; 32 use App\Http\Controllers\PagesController;
33 use Illuminate\Support\Facades\Storage; 33 use Illuminate\Support\Facades\Storage;
34 use App\Http\Controllers\EmployerController; 34 use App\Http\Controllers\EmployerController;
35 use App\Http\Controllers\CompanyController as FrontCompanyController; 35 use App\Http\Controllers\CompanyController as FrontCompanyController;
36 36
37 37
38 /* 38 /*
39 |-------------------------------------------------------------------------- 39 |--------------------------------------------------------------------------
40 | Web Routes 40 | Web Routes
41 |-------------------------------------------------------------------------- 41 |--------------------------------------------------------------------------
42 | 42 |
43 | Here is where you can register web routes for your application. These 43 | Here is where you can register web routes for your application. These
44 | routes are loaded by the RouteServiceProvider within a group which 44 | routes are loaded by the RouteServiceProvider within a group which
45 | contains the "web" middleware group. Now create something great! 45 | contains the "web" middleware group. Now create something great!
46 | 46 |
47 */ 47 */
48 /* 48 /*
49 Route::get('/', function () { 49 Route::get('/', function () {
50 return view('welcome'); 50 return view('welcome');
51 })->name('index'); 51 })->name('index');
52 */ 52 */
53 53
54 Route::get('/', [MainController::class, 'index'])->name('index'); 54 Route::get('/', [MainController::class, 'index'])->name('index');
55 55
56 //Роуты авторизации, регистрации, восстановления, аутентификации 56 //Роуты авторизации, регистрации, восстановления, аутентификации
57 Auth::routes(['verify' => true]); 57 Auth::routes(['verify' => true]);
58 58
59 //Личный кабинет пользователя 59 //Личный кабинет пользователя
60 Route::get('/home', [HomeController::class, 'index'])->name('home'); 60 Route::get('/home', [HomeController::class, 'index'])->name('home');
61 61
62 // Авторизация, регистрация в админку 62 // Авторизация, регистрация в админку
63 Route::group([ 63 Route::group([
64 'as' => 'admin.', // имя маршрута, например auth.index 64 'as' => 'admin.', // имя маршрута, например auth.index
65 'prefix' => 'admin', // префикс маршрута, например auth/index 65 'prefix' => 'admin', // префикс маршрута, например auth/index
66 'middleware' => ['guest'], 66 'middleware' => ['guest'],
67 ], function () { 67 ], function () {
68 // Форма регистрации 68 // Форма регистрации
69 Route::get('register', [AdminController::class, 'register'])->name('register'); 69 Route::get('register', [AdminController::class, 'register'])->name('register');
70 // Создание пользователя 70 // Создание пользователя
71 Route::post('register', [AdminController::class, 'create'])->name('create'); 71 Route::post('register', [AdminController::class, 'create'])->name('create');
72 72
73 //Форма входа 73 //Форма входа
74 Route::get('login', [AdminController::class, 'login'])->name('login'); 74 Route::get('login', [AdminController::class, 'login'])->name('login');
75 75
76 // аутентификация 76 // аутентификация
77 Route::post('login', [AdminController::class, 'autenticate'])->name('auth'); 77 Route::post('login', [AdminController::class, 'autenticate'])->name('auth');
78 78
79 }); 79 });
80 80
81 // Личный кабинет админки 81 // Личный кабинет админки
82 Route::group([ 82 Route::group([
83 'as' => 'admin.', // имя маршрута, например auth.index 83 'as' => 'admin.', // имя маршрута, например auth.index
84 'prefix' => 'admin', // префикс маршрута, например auth/index 84 'prefix' => 'admin', // префикс маршрута, например auth/index
85 'middleware' => ['auth', 'admin'], 85 'middleware' => ['auth', 'admin'],
86 ], function() { 86 ], function() {
87 87
88 // выход 88 // выход
89 Route::get('logout', [AdminController::class, 'logout'])->name('logout'); 89 Route::get('logout', [AdminController::class, 'logout'])->name('logout');
90 90
91 // кабинет главная страница 91 // кабинет главная страница
92 Route::get('cabinet', [AdminController::class, 'index'])->name('index'); 92 Route::get('cabinet', [AdminController::class, 'index'])->name('index');
93 Route::get('/', function () { 93 Route::get('/', function () {
94 return redirect()->route('admin.index'); 94 return redirect()->route('admin.index');
95 }); 95 });
96 96
97 // кабинет профиль админа - форма 97 // кабинет профиль админа - форма
98 Route::get('profile', [AdminController::class, 'profile'])->name('profile'); 98 Route::get('profile', [AdminController::class, 'profile'])->name('profile');
99 // кабинет профиль админа - сохранение формы 99 // кабинет профиль админа - сохранение формы
100 Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile'); 100 Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile');
101 101
102 //кабинет сообщения админа 102 //кабинет сообщения админа
103 //Route::get('messages', [AdminController::class, 'profile'])->name('profile'); 103 //Route::get('messages', [AdminController::class, 'profile'])->name('profile');
104 104
105 105
106 // кабинет профиль - форма пароли 106 // кабинет профиль - форма пароли
107 Route::get('password', [AdminController::class, 'profile_password'])->name('password'); 107 Route::get('password', [AdminController::class, 'profile_password'])->name('password');
108 // кабинет профиль - сохранение формы пароля 108 // кабинет профиль - сохранение формы пароля
109 Route::post('password', [AdminController::class, 'profile_password_new'])->name('password'); 109 Route::post('password', [AdminController::class, 'profile_password_new'])->name('password');
110 110
111 111
112 // кабинет профиль пользователя - форма 112 // кабинет профиль пользователя - форма
113 Route::get('user-profile/{user}', [AdminController::class, 'profile_user'])->name('user-profile'); 113 Route::get('user-profile/{user}', [AdminController::class, 'profile_user'])->name('user-profile');
114 // кабинет профиль пользователя - сохранение формы 114 // кабинет профиль пользователя - сохранение формы
115 Route::post('user-profile/{user}', [AdminController::class, 'store_profile_user'])->name('user-store_profile'); 115 Route::post('user-profile/{user}', [AdminController::class, 'store_profile_user'])->name('user-store_profile');
116 116
117 // кабинет профиль работодатель - форма 117 // кабинет профиль работодатель - форма
118 Route::get('employer-profile/{employer}', [EmployersController::class, 'form_update_employer'])->name('employer-profile'); 118 Route::get('employer-profile/{employer}', [EmployersController::class, 'form_update_employer'])->name('employer-profile');
119 // кабинет профиль работодатель - сохранение формы 119 // кабинет профиль работодатель - сохранение формы
120 Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile'); 120 Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile');
121 // кабинет удаление профиль работодателя и юзера 121 // кабинет удаление профиль работодателя и юзера
122 Route::delete('employers/delete/{employer}/{user}', [EmployersController::class, 'delete_employer'])->name('delete-employer'); 122 Route::delete('employers/delete/{employer}/{user}', [EmployersController::class, 'delete_employer'])->name('delete-employer');
123 123
124 // кабинет профиль работник - форма 124 // кабинет профиль работник - форма
125 Route::get('worker-profile/add/{user}', [WorkersController::class, 'form_add_worker'])->name('worker-profile-add'); 125 Route::get('worker-profile/add/{user}', [WorkersController::class, 'form_add_worker'])->name('worker-profile-add');
126 Route::post('worker-profile/add/{user}', [WorkersController::class, 'form_store_worker'])->name('worker-profile-store'); 126 Route::post('worker-profile/add/{user}', [WorkersController::class, 'form_store_worker'])->name('worker-profile-store');
127 Route::get('worker-profile/{worker}', [WorkersController::class, 'form_edit_worker'])->name('worker-profile-edit'); 127 Route::get('worker-profile/{worker}', [WorkersController::class, 'form_edit_worker'])->name('worker-profile-edit');
128 Route::get('worker-verify/{user}', [WorkersController::class, 'verify_worker'])->name('worker-verify');
128 // кабинет профиль работник - сохранение формы 129 // кабинет профиль работник - сохранение формы
129 Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile-update'); 130 Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile-update');
130 131
131 // Медиа 132 // Медиа
132 Route::get('media', [MediaController::class, 'index'])->name('media'); 133 Route::get('media', [MediaController::class, 'index'])->name('media');
133 Route::delete('media/{media}', [MediaController::class, 'delete'])->name('delete-media'); 134 Route::delete('media/{media}', [MediaController::class, 'delete'])->name('delete-media');
134 135
135 // кабинет настройки сайта - форма 136 // кабинет настройки сайта - форма
136 Route::get('config', [AdminController::class, 'config_form'])->name('config'); 137 Route::get('config', [AdminController::class, 'config_form'])->name('config');
137 // кабинет настройки сайта сохранение формы 138 // кабинет настройки сайта сохранение формы
138 Route::post('config', [AdminController::class, 'store_config'])->name('store_config'); 139 Route::post('config', [AdminController::class, 'store_config'])->name('store_config');
139 140
140 // кабинет - новости 141 // кабинет - новости
141 Route::get('news-list', [AdminController::class, 'news_admin'])->name('news_admin'); 142 Route::get('news-list', [AdminController::class, 'news_admin'])->name('news_admin');
142 Route::get('news/add', [AdminController::class, 'new_admin_add'])->name('new_admin_add'); 143 Route::get('news/add', [AdminController::class, 'new_admin_add'])->name('new_admin_add');
143 Route::post('news/add', [AdminController::class, 'new_admin_add_save'])->name('new_admin_save_add'); 144 Route::post('news/add', [AdminController::class, 'new_admin_add_save'])->name('new_admin_save_add');
144 Route::get('news/edit/{new}', [AdminController::class, 'new_admin_edit'])->name('new_admin_edit'); 145 Route::get('news/edit/{new}', [AdminController::class, 'new_admin_edit'])->name('new_admin_edit');
145 Route::post('news/edit/{new}', [AdminController::class, 'new_admin_update_save'])->name('new_admin_update'); 146 Route::post('news/edit/{new}', [AdminController::class, 'new_admin_update_save'])->name('new_admin_update');
146 Route::get('news/delete/{new}', [AdminController::class, 'new_admin_delete'])->name('new_admin_delete'); 147 Route::get('news/delete/{new}', [AdminController::class, 'new_admin_delete'])->name('new_admin_delete');
147 148
148 // кабинет - пользователи 149 // кабинет - пользователи
149 Route::get('users', [UsersController::class, 'index'])->name('users'); 150 Route::get('users', [UsersController::class, 'index'])->name('users');
150 Route::get('user-delete/{user}', [UsersController::class, 'user_delete'])->name('user_delete'); 151 Route::get('user-delete/{user}', [UsersController::class, 'user_delete'])->name('user_delete');
151 152
152 // кабинет - пользователи 153 // кабинет - пользователи
153 Route::get('admin-users', [AdminController::class, 'index_admin'])->name('admin-users'); 154 Route::get('admin-users', [AdminController::class, 'index_admin'])->name('admin-users');
154 155
155 // кабинет - работодатели 156 // кабинет - работодатели
156 Route::get('employers', [EmployersController::class, 'index'])->name('employers'); 157 Route::get('employers', [EmployersController::class, 'index'])->name('employers');
157 158
158 Route::get('employers/comment/{employer}', [EmployersController::class, 'comment_read'])->name('comment-employer'); 159 Route::get('employers/comment/{employer}', [EmployersController::class, 'comment_read'])->name('comment-employer');
159 160
160 Route::get('flot/add/{employer}', [EmployersController::class, 'add_flot'])->name('flot_add'); 161 Route::get('flot/add/{employer}', [EmployersController::class, 'add_flot'])->name('flot_add');
161 Route::post('flot/add', [EmployersController::class, 'save_add_flot'])->name('flot_add_save'); 162 Route::post('flot/add', [EmployersController::class, 'save_add_flot'])->name('flot_add_save');
162 Route::get('flot/{flot}/{employer}', [EmployersController::class, 'edit_flot'])->name('flot'); 163 Route::get('flot/{flot}/{employer}', [EmployersController::class, 'edit_flot'])->name('flot');
163 Route::put('flot/{flot}', [EmployersController::class, 'edit_save_flot'])->name('flot_edit'); 164 Route::put('flot/{flot}', [EmployersController::class, 'edit_save_flot'])->name('flot_edit');
164 Route::get('flot/{flot}/{employer_id}/delete', [EmployersController::class, 'delete_flot'])->name('flot_delete'); 165 Route::get('flot/{flot}/{employer_id}/delete', [EmployersController::class, 'delete_flot'])->name('flot_delete');
165 166
166 // кабинет - соискатели 167 // кабинет - соискатели
167 Route::get('workers', [WorkersController::class, 'index'])->name('workers'); 168 Route::get('workers', [WorkersController::class, 'index'])->name('workers');
168 169
169 // кабинет - база данных 170 // кабинет - база данных
170 Route::get('basedata', [UsersController::class, 'index_bd'])->name('basedata'); 171 Route::get('basedata', [UsersController::class, 'index_bd'])->name('basedata');
171 Route::get('basedata/add', [UsersController::class, 'add_bd'])->name('add-basedata'); 172 Route::get('basedata/add', [UsersController::class, 'add_bd'])->name('add-basedata');
172 Route::post('basedata/add', [UsersController::class, 'add_store_bd'])->name('add-store-basedata'); 173 Route::post('basedata/add', [UsersController::class, 'add_store_bd'])->name('add-store-basedata');
173 Route::get('basedata/edit/{user}', [UsersController::class, 'edit_bd'])->name('edit-basedata'); 174 Route::get('basedata/edit/{user}', [UsersController::class, 'edit_bd'])->name('edit-basedata');
174 Route::put('basedata/edit/{user}', [UsersController::class, 'update_bd'])->name('update-basedata'); 175 Route::put('basedata/edit/{user}', [UsersController::class, 'update_bd'])->name('update-basedata');
175 Route::delete('basedata/delete/{user}', [UsersController::class, 'destroy_bd'])->name('delete-basedata'); 176 Route::delete('basedata/delete/{user}', [UsersController::class, 'destroy_bd'])->name('delete-basedata');
176 Route::get('basedata/doc/{user}', [UsersController::class, 'doc_bd'])->name('doc-basedata'); 177 Route::get('basedata/doc/{user}', [UsersController::class, 'doc_bd'])->name('doc-basedata');
177 178
178 // кабинет - вакансии 179 // кабинет - вакансии
179 Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers'); 180 Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers');
180 Route::get('ad-employers/add', [Ad_EmployersController::class, 'create'])->name('add-ad-employers'); 181 Route::get('ad-employers/add', [Ad_EmployersController::class, 'create'])->name('add-ad-employers');
181 Route::post('ad-employers/add', [Ad_EmployersController::class, 'store'])->name('store-ad-employers'); 182 Route::post('ad-employers/add', [Ad_EmployersController::class, 'store'])->name('store-ad-employers');
182 Route::get('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'edit'])->name('edit-ad-employers'); 183 Route::get('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'edit'])->name('edit-ad-employers');
183 Route::post('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'update'])->name('update-ad-employers'); 184 Route::post('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'update'])->name('update-ad-employers');
184 Route::delete('ad-employers/delete/{ad_employer}', [Ad_EmployersController::class, 'destroy'])->name('delete-ad-employer'); 185 Route::delete('ad-employers/delete/{ad_employer}', [Ad_EmployersController::class, 'destroy'])->name('delete-ad-employer');
185 186
186 // Редактирование должности в вакансии 187 // Редактирование должности в вакансии
187 Route::put('update-jobs/{ad_jobs}', [Ad_EmployersController::class, 'update_ad_jobs'])->name('update_jobs'); 188 Route::put('update-jobs/{ad_jobs}', [Ad_EmployersController::class, 'update_ad_jobs'])->name('update_jobs');
188 Route::get('edit-jobs/{ad_jobs}', [Ad_EmployersController::class, 'edit_jobs'])->name('edit_jobs'); 189 Route::get('edit-jobs/{ad_jobs}', [Ad_EmployersController::class, 'edit_jobs'])->name('edit_jobs');
189 190
190 191
191 // кабинет - категории 192 // кабинет - категории
192 //Route::get('categories', [AdminController::class, 'index'])->name('categories'); 193 //Route::get('categories', [AdminController::class, 'index'])->name('categories');
193 194
194 // СRUD-операции над Справочником Категории 195 // СRUD-операции над Справочником Категории
195 196
196 Route::resource('categories', CategoryController::class, ['except' => ['show']]); 197 Route::resource('categories', CategoryController::class, ['except' => ['show']]);
197 198
198 // CRUD-операции над справочником Категории для работодателей 199 // CRUD-операции над справочником Категории для работодателей
199 Route::resource('category-emp', CategoryEmpController::class, ['except' => ['show']]); 200 Route::resource('category-emp', CategoryEmpController::class, ['except' => ['show']]);
200 201
201 // CRUD-операции над справочником Образование 202 // CRUD-операции над справочником Образование
202 Route::resource('education', EducationController::class, ['except' => ['show']]); 203 Route::resource('education', EducationController::class, ['except' => ['show']]);
203 204
204 Route::get('rename-program-education', [EducationController::class, 'rename_program'])->name('rename-program-education'); 205 Route::get('rename-program-education', [EducationController::class, 'rename_program'])->name('rename-program-education');
205 Route::get('program-education', [EducationController::class, 'add_program'])->name('add-program-education'); 206 Route::get('program-education', [EducationController::class, 'add_program'])->name('add-program-education');
206 Route::post('program-education', [EducationController::class, 'store_program'])->name('store-program-education'); 207 Route::post('program-education', [EducationController::class, 'store_program'])->name('store-program-education');
207 208
208 Route::get('program-education/edit/{program}/{education}', [EducationController::class, 'edit_program'])->name('edit-program-education'); 209 Route::get('program-education/edit/{program}/{education}', [EducationController::class, 'edit_program'])->name('edit-program-education');
209 Route::post('program-education/edit/{program}/{education}', [EducationController::class, 'update_program'])->name('update-program-education'); 210 Route::post('program-education/edit/{program}/{education}', [EducationController::class, 'update_program'])->name('update-program-education');
210 211
211 Route::get('program-education/delete/{program}/{education}', [EducationController::class, 'delete_program'])->name('delete-program-education'); 212 Route::get('program-education/delete/{program}/{education}', [EducationController::class, 'delete_program'])->name('delete-program-education');
212 213
213 /* 214 /*
214 * кабинет - CRUD-операции по справочнику должности 215 * кабинет - CRUD-операции по справочнику должности
215 * 216 *
216 */ 217 */
217 Route::resource('job-titles', JobTitlesController::class, ['except' => ['show']]); 218 Route::resource('job-titles', JobTitlesController::class, ['except' => ['show']]);
218 219
219 // кабинет - сообщения (чтение чужих) 220 // кабинет - сообщения (чтение чужих)
220 Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages'); 221 Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages');
221 // кабинет - просмотр сообщения чужого (чтение) 222 // кабинет - просмотр сообщения чужого (чтение)
222 Route::get('messages/{message}', [MsgAnswersController::class, 'read_message'])->name('read-message'); 223 Route::get('messages/{message}', [MsgAnswersController::class, 'read_message'])->name('read-message');
223 224
224 // кабинет - сообщения (админские) 225 // кабинет - сообщения (админские)
225 Route::get('admin-messages', [MsgAnswersController::class, 'admin_messages'])->name('admin-messages'); 226 Route::get('admin-messages', [MsgAnswersController::class, 'admin_messages'])->name('admin-messages');
226 // кабинет - сообщения (админские) 227 // кабинет - сообщения (админские)
227 Route::post('admin-messages', [MsgAnswersController::class, 'admin_messages_post'])->name('admin-messages-post'); 228 Route::post('admin-messages', [MsgAnswersController::class, 'admin_messages_post'])->name('admin-messages-post');
228 // кабинет - sql - конструкция запросов 229 // кабинет - sql - конструкция запросов
229 Route::get('messages-sql', [MsgAnswersController::class, 'messages_sql'])->name('messages-sql'); 230 Route::get('messages-sql', [MsgAnswersController::class, 'messages_sql'])->name('messages-sql');
230 231
231 Route::post('admin-reject-message', [MsgAnswersController::class, 'reject_message'])->name('reject_message'); 232 Route::post('admin-reject-message', [MsgAnswersController::class, 'reject_message'])->name('reject_message');
232 Route::post('admin-send-message', [MsgAnswersController::class, 'send_message'])->name('send_message'); 233 Route::post('admin-send-message', [MsgAnswersController::class, 'send_message'])->name('send_message');
233 234
234 /* 235 /*
235 * Расписанный подход в описании каждой директорий групп пользователей. 236 * Расписанный подход в описании каждой директорий групп пользователей.
236 */ 237 */
237 // кабинет - группы пользователей 238 // кабинет - группы пользователей
238 Route::get('groups', [GroupsController::class, 'index'])->name('groups'); 239 Route::get('groups', [GroupsController::class, 'index'])->name('groups');
239 // кабинет - добавление форма группы пользователей 240 // кабинет - добавление форма группы пользователей
240 Route::get('groups/add', [GroupsController::class, 'add'])->name('add-group'); 241 Route::get('groups/add', [GroupsController::class, 'add'])->name('add-group');
241 // кабинет - сохранение формы группы пользователей 242 // кабинет - сохранение формы группы пользователей
242 Route::post('groups/add', [GroupsController::class, 'store'])->name('add-group-store'); 243 Route::post('groups/add', [GroupsController::class, 'store'])->name('add-group-store');
243 // кабинет - редактирование форма группы пользователей 244 // кабинет - редактирование форма группы пользователей
244 Route::get('groups/edit/{group}', [GroupsController::class, 'edit'])->name('edit-group'); 245 Route::get('groups/edit/{group}', [GroupsController::class, 'edit'])->name('edit-group');
245 // кабинет - сохранение редактированной формы группы пользователей 246 // кабинет - сохранение редактированной формы группы пользователей
246 Route::post('groups/edit/{group}', [GroupsController::class, 'update'])->name('update-group'); 247 Route::post('groups/edit/{group}', [GroupsController::class, 'update'])->name('update-group');
247 // кабинет - удаление группы пользователей 248 // кабинет - удаление группы пользователей
248 Route::delete('groups/delete/{group}', [GroupsController::class, 'destroy'])->name('delete-group'); 249 Route::delete('groups/delete/{group}', [GroupsController::class, 'destroy'])->name('delete-group');
249 250
250 251
251 // кабинет - список админов 252 // кабинет - список админов
252 Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin'); 253 Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin');
253 254
254 // справочник Позиции 255 // справочник Позиции
255 Route::get('positions', [AdminController::class, 'position'])->name('position'); 256 Route::get('positions', [AdminController::class, 'position'])->name('position');
256 Route::get('positions/add', [AdminController::class, 'position_add'])->name('add-position'); 257 Route::get('positions/add', [AdminController::class, 'position_add'])->name('add-position');
257 Route::post('positions/add', [AdminController::class, 'position_add_save'])->name('add-save-position'); 258 Route::post('positions/add', [AdminController::class, 'position_add_save'])->name('add-save-position');
258 Route::get('positions/edit/{position}', [AdminController::class, 'position_edit'])->name('edit-position'); 259 Route::get('positions/edit/{position}', [AdminController::class, 'position_edit'])->name('edit-position');
259 Route::post('position/edit/{position}', [AdminController::class, 'position_update'])->name('update-position'); 260 Route::post('position/edit/{position}', [AdminController::class, 'position_update'])->name('update-position');
260 Route::get('position/delete/{position}', [AdminController::class, 'position_delete'])->name('delete-position'); 261 Route::get('position/delete/{position}', [AdminController::class, 'position_delete'])->name('delete-position');
261 262
262 /////редактор////// кабинет - редактор сайта//////////////////////// 263 /////редактор////// кабинет - редактор сайта////////////////////////
263 Route::get('editor-site', function() { 264 Route::get('editor-site', function() {
264 return view('admin.editor.index'); 265 return view('admin.editor.index');
265 })->name('editor-site'); 266 })->name('editor-site');
266 267
267 268
268 // кабинет - редактор шапки-футера сайта 269 // кабинет - редактор шапки-футера сайта
269 Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks'); 270 Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks');
270 Route::get('edit-bloks/add', [CompanyController::class, 'editblock_add'])->name('add-block'); 271 Route::get('edit-bloks/add', [CompanyController::class, 'editblock_add'])->name('add-block');
271 Route::post('edit-bloks/add', [CompanyController::class, 'editblock_store'])->name('add-block-store'); 272 Route::post('edit-bloks/add', [CompanyController::class, 'editblock_store'])->name('add-block-store');
272 Route::get('edit-bloks/ajax', [CompanyController::class, 'editblock_ajax'])->name('ajax.block'); 273 Route::get('edit-bloks/ajax', [CompanyController::class, 'editblock_ajax'])->name('ajax.block');
273 Route::get('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_edit'])->name('edit-block'); 274 Route::get('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_edit'])->name('edit-block');
274 Route::put('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_update'])->name('update-block'); 275 Route::put('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_update'])->name('update-block');
275 Route::delete('edit-bloks/delete/{block}', [CompanyController::class, 'editblock_destroy'])->name('delete-block'); 276 Route::delete('edit-bloks/delete/{block}', [CompanyController::class, 'editblock_destroy'])->name('delete-block');
276 277
277 278
278 // кабинет - редактор должности на главной 279 // кабинет - редактор должности на главной
279 Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main'); 280 Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main');
280 281
281 // кабинет - счетчики на главной 282 // кабинет - счетчики на главной
282 Route::get('counters-main', [CompanyController::class, 'counters_main'])->name('counters-main'); 283 Route::get('counters-main', [CompanyController::class, 'counters_main'])->name('counters-main');
283 Route::post('counters-main/edit/{name}', [CompanyController::class, 'counters_main_update'])->name('counters-main-update'); 284 Route::post('counters-main/edit/{name}', [CompanyController::class, 'counters_main_update'])->name('counters-main-update');
284 285
285 // кабинет - редактор работодатели на главной 286 // кабинет - редактор работодатели на главной
286 Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main'); 287 Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main');
287 Route::post('employers-main-add', [CompanyController::class, 'employers_main_add'])->name('employers-main-add'); 288 Route::post('employers-main-add', [CompanyController::class, 'employers_main_add'])->name('employers-main-add');
288 Route::post('employers-main-remove', [CompanyController::class, 'employers_main_remove'])->name('employers-main-remove'); 289 Route::post('employers-main-remove', [CompanyController::class, 'employers_main_remove'])->name('employers-main-remove');
289 290
290 291
291 // кабинет - редактор seo-сайта 292 // кабинет - редактор seo-сайта
292 Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo'); 293 Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo');
293 Route::get('editor-seo/add', [CompanyController::class, 'editor_seo_add'])->name('add-seo'); 294 Route::get('editor-seo/add', [CompanyController::class, 'editor_seo_add'])->name('add-seo');
294 Route::post('editor-seo/add', [CompanyController::class, 'editor_seo_store'])->name('add-seo-store'); 295 Route::post('editor-seo/add', [CompanyController::class, 'editor_seo_store'])->name('add-seo-store');
295 Route::get('editor-seo/ajax', [CompanyController::class, 'editor_seo_ajax'])->name('ajax.seo'); 296 Route::get('editor-seo/ajax', [CompanyController::class, 'editor_seo_ajax'])->name('ajax.seo');
296 Route::get('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_edit'])->name('edit-seo'); 297 Route::get('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_edit'])->name('edit-seo');
297 Route::put('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_update'])->name('update-seo'); 298 Route::put('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_update'])->name('update-seo');
298 Route::delete('editor-seo/delete/{page}', [CompanyController::class, 'editor_seo_destroy'])->name('delete-seo'); 299 Route::delete('editor-seo/delete/{page}', [CompanyController::class, 'editor_seo_destroy'])->name('delete-seo');
299 300
300 301
301 // кабинет - редактор страниц 302 // кабинет - редактор страниц
302 Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages'); 303 Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages');
303 // кабинет - добавление страницы 304 // кабинет - добавление страницы
304 Route::get('editor-pages/add', [CompanyController::class, 'editor_pages_add'])->name('add-page'); 305 Route::get('editor-pages/add', [CompanyController::class, 'editor_pages_add'])->name('add-page');
305 // кабинет - сохранение формы страницы 306 // кабинет - сохранение формы страницы
306 Route::post('editor-page/add', [CompanyController::class, 'editor_pages_store'])->name('add-page-store'); 307 Route::post('editor-page/add', [CompanyController::class, 'editor_pages_store'])->name('add-page-store');
307 // кабинет - редактирование форма страницы 308 // кабинет - редактирование форма страницы
308 Route::get('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_edit'])->name('edit-page'); 309 Route::get('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_edit'])->name('edit-page');
309 // кабинет - сохранение редактированной формы страницы 310 // кабинет - сохранение редактированной формы страницы
310 Route::put('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_update'])->name('update-page'); 311 Route::put('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_update'])->name('update-page');
311 // кабинет - удаление страницы 312 // кабинет - удаление страницы
312 Route::delete('editor-pages/delete/{page}', [CompanyController::class, 'editor_pages_destroy'])->name('delete-page'); 313 Route::delete('editor-pages/delete/{page}', [CompanyController::class, 'editor_pages_destroy'])->name('delete-page');
313 314
314 315
315 // кабинет - реклама сайта 316 // кабинет - реклама сайта
316 Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames'); 317 Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames');
317 Route::get('reclames/add', [CompanyController::class, 'reclames_add'])->name('add-reclames'); 318 Route::get('reclames/add', [CompanyController::class, 'reclames_add'])->name('add-reclames');
318 Route::post('reclames/add', [CompanyController::class, 'reclames_store'])->name('add-reclames-store'); 319 Route::post('reclames/add', [CompanyController::class, 'reclames_store'])->name('add-reclames-store');
319 Route::get('reclames/edit/{reclame}', [CompanyController::class, 'reclames_edit'])->name('edit-reclames'); 320 Route::get('reclames/edit/{reclame}', [CompanyController::class, 'reclames_edit'])->name('edit-reclames');
320 Route::put('reclames/edit/{reclame}', [CompanyController::class, 'reclames_update'])->name('update-reclames'); 321 Route::put('reclames/edit/{reclame}', [CompanyController::class, 'reclames_update'])->name('update-reclames');
321 Route::delete('reclames/delete/{reclame}', [CompanyController::class, 'reclames_destroy'])->name('delete-reclames'); 322 Route::delete('reclames/delete/{reclame}', [CompanyController::class, 'reclames_destroy'])->name('delete-reclames');
322 //////////////////////////////////////////////////////////////////////// 323 ////////////////////////////////////////////////////////////////////////
323 324
324 325
325 // кабинет - отзывы о работодателе для модерации 326 // кабинет - отзывы о работодателе для модерации
326 Route::get('answers', [EmployersController::class, 'answers'])->name('answers'); 327 Route::get('answers', [EmployersController::class, 'answers'])->name('answers');
327 328
328 // Общая страница статистики 329 // Общая страница статистики
329 Route::get('statics', function () { 330 Route::get('statics', function () {
330 return view('admin.static.index'); 331 return view('admin.static.index');
331 })->name('statics'); 332 })->name('statics');
332 333
333 // кабинет - статистика работников 334 // кабинет - статистика работников
334 Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers'); 335 Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers');
335 336
336 // кабинет - статистика вакансий работодателя 337 // кабинет - статистика вакансий работодателя
337 Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads'); 338 Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads');
338 339
339 // кабинет - справочник - блоки информации (дипломы и документы) для резюме работника 340 // кабинет - справочник - блоки информации (дипломы и документы) для резюме работника
340 /* 341 /*
341 * CRUD-операции над справочником дипломы и документы 342 * CRUD-операции над справочником дипломы и документы
342 */ 343 */
343 //Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks'); 344 //Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks');
344 Route::resource('infobloks', InfoBloksController::class, ['except' => ['show']]); 345 Route::resource('infobloks', InfoBloksController::class, ['except' => ['show']]);
345 346
346 // кабинет - роли пользователя 347 // кабинет - роли пользователя
347 Route::get('roles', [UsersController::class, 'roles'])->name('roles'); 348 Route::get('roles', [UsersController::class, 'roles'])->name('roles');
348 349
349 Route::get('admin_roles', [UsersController::class, 'admin_roles'])->name('admin_roles'); 350 Route::get('admin_roles', [UsersController::class, 'admin_roles'])->name('admin_roles');
350 351
351 Route::get('logs', function() { 352 Route::get('logs', function() {
352 $files = Storage::files('logs/laravel.log'); 353 $files = Storage::files('logs/laravel.log');
353 })->name('logs'); 354 })->name('logs');
354 355
355 Route::prefix('faq')->as('faq.')->group(function () { 356 Route::prefix('faq')->as('faq.')->group(function () {
356 Route::middleware('admin')->group(function () { 357 Route::middleware('admin')->group(function () {
357 Route::get('/', [FaqController::class, 'showListForAdmin'])->name('list'); 358 Route::get('/', [FaqController::class, 'showListForAdmin'])->name('list');
358 Route::get('/create', [FaqController::class, 'create'])->name('create'); 359 Route::get('/create', [FaqController::class, 'create'])->name('create');
359 Route::post('/create', [FaqController::class, 'store'])->name('store'); 360 Route::post('/create', [FaqController::class, 'store'])->name('store');
360 Route::get('/edit/{id}', [FaqController::class, 'edit'])->name('edit'); 361 Route::get('/edit/{id}', [FaqController::class, 'edit'])->name('edit');
361 Route::put('/edit/{id}', [FaqController::class, 'update'])->name('update'); 362 Route::put('/edit/{id}', [FaqController::class, 'update'])->name('update');
362 Route::get('/destroy/{id}', [FaqController::class, 'destroy'])->name('destroy'); 363 Route::get('/destroy/{id}', [FaqController::class, 'destroy'])->name('destroy');
363 }); 364 });
364 }); 365 });
365 }); 366 });
366 367
367 // Инструментальные страницы 368 // Инструментальные страницы
368 Route::post('ckeditor/upload', [CKEditorController::class, 'upload'])->name('ckeditor.image-upload'); 369 Route::post('ckeditor/upload', [CKEditorController::class, 'upload'])->name('ckeditor.image-upload');
369 370
370 Route::get('redis/', [PagesController::class, 'redis'])->name('redis'); 371 Route::get('redis/', [PagesController::class, 'redis'])->name('redis');
371 372
372 Route::get('excel/', [PagesController::class, 'excel'])->name('excel'); 373 Route::get('excel/', [PagesController::class, 'excel'])->name('excel');
373 374
374 // Страницы с произвольным контентом 375 // Страницы с произвольным контентом
375 Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page'); 376 Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page');
376 377
377 // Форма обратной связи 378 // Форма обратной связи
378 Route::post('form_feedback', [PagesController::class, 'form_feedback'])->name('form_feedback'); 379 Route::post('form_feedback', [PagesController::class, 'form_feedback'])->name('form_feedback');
379 380
380 // Публичные страницы соискателя 381 // Публичные страницы соискателя
381 Route::get('workers/profile/{worker}', [WorkerController::class, 'profile'])->name('worker_page'); 382 Route::get('workers/profile/{worker}', [WorkerController::class, 'profile'])->name('worker_page');
382 383
383 //Страница вакансии 384 //Страница вакансии
384 Route::get('employer/ad/{ad_employer}', [AdEmployerController::class, 'ad_employer'])->name('ad-employer'); 385 Route::get('employer/ad/{ad_employer}', [AdEmployerController::class, 'ad_employer'])->name('ad-employer');
385 386
386 //Вакансии 387 //Вакансии
387 Route::get('vacancies', [MainController::class, 'vacancies'])->name('vacancies'); 388 Route::get('vacancies', [MainController::class, 'vacancies'])->name('vacancies');
388 389
389 //Вакансии поиск на главной 390 //Вакансии поиск на главной
390 Route::get('search-vacancies', [MainController::class, 'search_vacancies'])->name('search_vacancies'); 391 Route::get('search-vacancies', [MainController::class, 'search_vacancies'])->name('search_vacancies');
391 392
392 //Вакансии категория детальная 393 //Вакансии категория детальная
393 Route::get('list-vacancies/{categories?}', [MainController::class, 'list_vacancies'])->name('list-vacancies'); 394 Route::get('list-vacancies/{categories?}', [MainController::class, 'list_vacancies'])->name('list-vacancies');
394 395
395 // Лайк вакансии 396 // Лайк вакансии
396 Route::get('like-vacancy', [MainController::class, 'like_vacancy'])->name('like-vacancy'); 397 Route::get('like-vacancy', [MainController::class, 'like_vacancy'])->name('like-vacancy');
397 398
398 //Детальная страница вакансии - работодателя 399 //Детальная страница вакансии - работодателя
399 Route::get('vacancie/{vacancy}', [FrontEmployersController::class, 'vacancie'])->name('vacancie'); 400 Route::get('vacancie/{vacancy}', [FrontEmployersController::class, 'vacancie'])->name('vacancie');
400 401
401 Route::get('vacancy/{vacancy}', [AdEmployerController::class, 'getById'])->name('get-vacancy-by-id'); 402 Route::get('vacancy/{vacancy}', [AdEmployerController::class, 'getById'])->name('get-vacancy-by-id');
402 403
403 //Судоходные компании 404 //Судоходные компании
404 Route::get('shipping-companies', [FrontCompanyController::class, 'shipping_companies'])->name('shipping_companies'); 405 Route::get('shipping-companies', [FrontCompanyController::class, 'shipping_companies'])->name('shipping_companies');
405 406
406 //Детальная инфа о компании 407 //Детальная инфа о компании
407 Route::get('info-company/{company}', [FrontCompanyController::class, 'info_company'])->name('info_company'); 408 Route::get('info-company/{company}', [FrontCompanyController::class, 'info_company'])->name('info_company');
408 409
409 //Образование 410 //Образование
410 Route::get('education', [EducationFrontController::class, 'index'])->name('education'); 411 Route::get('education', [EducationFrontController::class, 'index'])->name('education');
411 Route::get('education/{education}', [EducationFrontController::class, 'show'])->name('show_education')->where('education', '[0-9]+');; 412 Route::get('education/{education}', [EducationFrontController::class, 'show'])->name('show_education')->where('education', '[0-9]+');;
412 413
413 //Новости 414 //Новости
414 Route::get('news', [MainController::class, 'news'])->name('news'); 415 Route::get('news', [MainController::class, 'news'])->name('news');
415 Route::get('detail-new/{new}', [MainController::class, 'detail_new'])->name('detail_new'); 416 Route::get('detail-new/{new}', [MainController::class, 'detail_new'])->name('detail_new');
416 417
417 //Контакты 418 //Контакты
418 Route::get('contacts', [MainController::class, 'contacts'])->name('contacts'); 419 Route::get('contacts', [MainController::class, 'contacts'])->name('contacts');
419 420
420 //База резюме 421 //База резюме
421 Route::get('bd-resume', [WorkerController::class, 'bd_resume'])->name('bd_resume'); 422 Route::get('bd-resume', [WorkerController::class, 'bd_resume'])->name('bd_resume');
422 Route::get('bd_resume_danger', function(){ 423 Route::get('bd_resume_danger', function(){
423 return view('employers.bd_resume_danger'); 424 return view('employers.bd_resume_danger');
424 })->name('bd_resume_danger'); 425 })->name('bd_resume_danger');
425 426
426 Route::get('like-resume', [MainController::class, 'like_worker'])->name('like_resume'); 427 Route::get('like-resume', [MainController::class, 'like_worker'])->name('like_resume');
427 428
428 //Анкета соискателя 429 //Анкета соискателя
429 Route::get('resume-profile/{worker}', [WorkerController::class, 'resume_profile'])->name('resume_profile'); 430 Route::get('resume-profile/{worker}', [WorkerController::class, 'resume_profile'])->name('resume_profile');
430 431
431 //Скачать резюме 432 //Скачать резюме
432 Route::get('resume-download/{worker}', [WorkerController::class, 'resume_download'])->name('resume_download'); 433 Route::get('resume-download/{worker}', [WorkerController::class, 'resume_download'])->name('resume_download');
433 Route::get('resume-download/all', [WorkerController::class, 'resume_download_all'])->name('resume_download_all2'); 434 Route::get('resume-download/all', [WorkerController::class, 'resume_download_all'])->name('resume_download_all2');
434 Route::get('resume-download', [WorkerController::class, 'resume_download_all'])->name('resume_download_all'); 435 Route::get('resume-download', [WorkerController::class, 'resume_download_all'])->name('resume_download_all');
435 436
436 437
437 //Вход в кабинет 438 //Вход в кабинет
438 Route::get('login', [MainController::class, 'input_login'])->name('login'); 439 Route::get('login', [MainController::class, 'input_login'])->name('login');
439 440
440 // Выход из кабинета 441 // Выход из кабинета
441 Route::get('logout', [EmployerController::class, 'logout'])->name('logout'); 442 Route::get('logout', [EmployerController::class, 'logout'])->name('logout');
442 443
443 Route::get( 'register_worker', [WorkerController::class, 'register_worker'])->name('register_worker'); 444 Route::get( 'register_worker', [WorkerController::class, 'register_worker'])->name('register_worker');
444 Route::get('register_employer', [EmployerController::class, 'register_employer'])->name('register_employer'); 445 Route::get('register_employer', [EmployerController::class, 'register_employer'])->name('register_employer');
445 446
446 //восстановление пароля 447 //восстановление пароля
447 Route::get('repair-password', [MainController::class, 'repair_password'])->name('repair_password'); 448 Route::get('repair-password', [MainController::class, 'repair_password'])->name('repair_password');
448 // Звезда сообщения 449 // Звезда сообщения
449 Route::post('stars-answer', [WorkerController::class, 'stars_answer'])->name('stars_answer'); 450 Route::post('stars-answer', [WorkerController::class, 'stars_answer'])->name('stars_answer');
450 451
451 // Борьба 452 // Борьба
452 Route::get('clear_cookie', function() { 453 Route::get('clear_cookie', function() {
453 \App\Classes\Cookies_vacancy::clear_vacancy(); 454 \App\Classes\Cookies_vacancy::clear_vacancy();
454 return redirect()->route('index'); 455 return redirect()->route('index');
455 })->name('clear_cookie'); 456 })->name('clear_cookie');
456 457
457 Route::get('cookies', function() { 458 Route::get('cookies', function() {
458 return view('cookies'); 459 return view('cookies');
459 })->name('cookies'); 460 })->name('cookies');
460 461
461 // Личный кабинет работник 462 // Личный кабинет работник
462 Route::group([ 463 Route::group([
463 'as' => 'worker.', // имя маршрута, например auth.index 464 'as' => 'worker.', // имя маршрута, например auth.index
464 'prefix' => 'worker', // префикс маршрута, например auth/index 465 'prefix' => 'worker', // префикс маршрута, например auth/index
465 'middleware' => ['auth', 'is_worker'], 466 'middleware' => ['auth', 'is_worker'],
466 ], function() { 467 ], function() {
467 // Формы редактирования 468 // Формы редактирования
468 Route::get('cabinet/basic_information', [WorkerController::class, 'basic_information'])->name('basic_information'); 469 Route::get('cabinet/basic_information', [WorkerController::class, 'basic_information'])->name('basic_information');
469 Route::get('cabinet/additional_documents', [WorkerController::class, 'additional_documents'])->name('additional_documents'); 470 Route::get('cabinet/additional_documents', [WorkerController::class, 'additional_documents'])->name('additional_documents');
470 471
471 // 1 страница - Моя анкета 472 // 1 страница - Моя анкета
472 Route::get('cabinet', [WorkerController::class, 'cabinet'])->name('cabinet'); 473 Route::get('cabinet', [WorkerController::class, 'cabinet'])->name('cabinet');
473 Route::post('cabinet/{worker}', [WorkerController::class, 'cabinet_save'])->name('cabinet_save'); 474 Route::post('cabinet/{worker}', [WorkerController::class, 'cabinet_save'])->name('cabinet_save');
474 Route::post('cabinet/cabinet_save_foto/{worker}', [WorkerController::class, 'cabinet_save_foto'])->name('cabinet_save_foto'); 475 Route::post('cabinet/cabinet_save_foto/{worker}', [WorkerController::class, 'cabinet_save_foto'])->name('cabinet_save_foto');
475 476
476 Route::get('cabinet/subscribe', [WorkerController::class, 'subscribe'])->name('subscribe'); 477 Route::get('cabinet/subscribe', [WorkerController::class, 'subscribe'])->name('subscribe');
477 Route::post('cabinet/subscribe/save', [WorkerController::class, 'save_subscribe'])->name('save_subscribe'); 478 Route::post('cabinet/subscribe/save', [WorkerController::class, 'save_subscribe'])->name('save_subscribe');
478 479
479 480
480 // 2 страница - Сообщения 481 // 2 страница - Сообщения
481 Route::get('cabinet/messages/{type_message}', [WorkerController::class, 'messages'])->name('messages'); 482 Route::get('cabinet/messages/{type_message}', [WorkerController::class, 'messages'])->name('messages');
482 Route::get('cabinet/dialog/{chat}', [WorkerController::class, 'dialog'])->name('dialog'); 483 Route::get('cabinet/dialog/{chat}', [WorkerController::class, 'dialog'])->name('dialog');
483 // 3 страница - Избранные вакансии 484 // 3 страница - Избранные вакансии
484 Route::get('cabinet/favorite', [WorkerController::class, 'favorite'])->name('favorite'); 485 Route::get('cabinet/favorite', [WorkerController::class, 'favorite'])->name('favorite');
485 // Продолжение борьбы против колорадов - избранные вакансии 486 // Продолжение борьбы против колорадов - избранные вакансии
486 Route::get('кабинет/favorite', [WorkerController::class, 'colorado'])->name('colorado'); 487 Route::get('кабинет/favorite', [WorkerController::class, 'colorado'])->name('colorado');
487 488
488 // 4 страница - Сменить пароль 489 // 4 страница - Сменить пароль
489 Route::get('кабинет/new_password', [WorkerController::class, 'new_password'])->name('new_password'); 490 Route::get('кабинет/new_password', [WorkerController::class, 'new_password'])->name('new_password');
490 Route::post('кабинет/new_password/save', [WorkerController::class, 'save_new_password'])->name('save_new_password'); 491 Route::post('кабинет/new_password/save', [WorkerController::class, 'save_new_password'])->name('save_new_password');
491 492
492 // 5 страница - Удалить профиль 493 // 5 страница - Удалить профиль
493 Route::get('кабинет/delete_profile', [WorkerController::class, 'delete_profile'])->name('delete_profile'); 494 Route::get('кабинет/delete_profile', [WorkerController::class, 'delete_profile'])->name('delete_profile');
494 Route::post('кабинет/delete_profile/delete', [WorkerController::class, 'delete_profile_result'])->name('deleteprofile_result'); 495 Route::post('кабинет/delete_profile/delete', [WorkerController::class, 'delete_profile_result'])->name('deleteprofile_result');
495 496
496 // Резюме -pdf 497 // Резюме -pdf
497 Route::get('кабинет/download/{worker}', [WorkerController::class, 'download'])->name('download'); 498 Route::get('кабинет/download/{worker}', [WorkerController::class, 'download'])->name('download');
498 499
499 // Поднятие анкеты 500 // Поднятие анкеты
500 Route::get('кабинет/up/{worker}', [WorkerController::class, 'up'])->name('up'); 501 Route::get('кабинет/up/{worker}', [WorkerController::class, 'up'])->name('up');
501 502
502 Route::post('test123', [WorkerController::class, 'test123'])->name('test123'); 503 Route::post('test123', [WorkerController::class, 'test123'])->name('test123');
503 504
504 // Добавление сертификата 505 // Добавление сертификата
505 Route::get('кабинет/new_sertificate/{worker}', [WorkerController::class, 'new_sertificate'])->name('new_sertificate'); 506 Route::get('кабинет/new_sertificate/{worker}', [WorkerController::class, 'new_sertificate'])->name('new_sertificate');
506 Route::post('кабинет/add_sertificate', [WorkerController::class, 'add_serificate'])->name('add_serificate'); 507 Route::post('кабинет/add_sertificate', [WorkerController::class, 'add_serificate'])->name('add_serificate');
507 Route::get('кабинет/edit_sertificate/{worker}/{doc}', [WorkerController::class, 'edit_sertificate'])->name('edit_sertificate'); 508 Route::get('кабинет/edit_sertificate/{worker}/{doc}', [WorkerController::class, 'edit_sertificate'])->name('edit_sertificate');
508 Route::get('кабинет/edit_sertificate/{doc}', [WorkerController::class, 'update_serificate'])->name('update_serificate'); 509 Route::get('кабинет/edit_sertificate/{doc}', [WorkerController::class, 'update_serificate'])->name('update_serificate');
509 Route::get('кабинет/delete_sertificate/{doc}', [WorkerController::class, 'delete_sertificate'])->name('delete_sertificate'); 510 Route::get('кабинет/delete_sertificate/{doc}', [WorkerController::class, 'delete_sertificate'])->name('delete_sertificate');
510 511
511 // Добавление предыдущих контактов компании 512 // Добавление предыдущих контактов компании
512 Route::get('кабинет/prev_company/{worker}', [WorkerController::class, 'new_prev_company'])->name('new_prev_company'); 513 Route::get('кабинет/prev_company/{worker}', [WorkerController::class, 'new_prev_company'])->name('new_prev_company');
513 Route::post('кабинет/add_prev_company', [WorkerController::class, 'add_prev_company'])->name('add_prev_company'); 514 Route::post('кабинет/add_prev_company', [WorkerController::class, 'add_prev_company'])->name('add_prev_company');
514 Route::get('кабинет/edit_prev_company/{doc}/{worker}', [WorkerController::class, 'edit_prev_company'])->name('edit_prev_company'); 515 Route::get('кабинет/edit_prev_company/{doc}/{worker}', [WorkerController::class, 'edit_prev_company'])->name('edit_prev_company');
515 Route::post('кабинет/update_prev_company/{doc}', [WorkerController::class, 'update_prev_company'])->name('update_prev_company'); 516 Route::post('кабинет/update_prev_company/{doc}', [WorkerController::class, 'update_prev_company'])->name('update_prev_company');
516 Route::get('кабинет/delete_prev_company/{doc}', [WorkerController::class, 'delete_prev_company'])->name('delete_prev_company'); 517 Route::get('кабинет/delete_prev_company/{doc}', [WorkerController::class, 'delete_prev_company'])->name('delete_prev_company');
517 518
518 // Добавление документа-диплома 519 // Добавление документа-диплома
519 Route::get('кабинет/add_diplom/{worker}', [WorkerController::class, 'add_diplom'])->name('add_diplom'); 520 Route::get('кабинет/add_diplom/{worker}', [WorkerController::class, 'add_diplom'])->name('add_diplom');
520 Route::post('кабинет/add_diplom', [WorkerController::class, 'add_diplom_save'])->name('dop_info_save'); 521 Route::post('кабинет/add_diplom', [WorkerController::class, 'add_diplom_save'])->name('dop_info_save');
521 Route::put('кабинет/edit_diploms/{worker}', [WorkerController::class, 'edit_diploms'])->name('edit_diploms'); 522 Route::put('кабинет/edit_diploms/{worker}', [WorkerController::class, 'edit_diploms'])->name('edit_diploms');
522 Route::get('кабинет/delete_ad_diplom/{worker}', [WorkerController::class, 'delete_add_diplom'])->name('delete_add_diplom'); 523 Route::get('кабинет/delete_ad_diplom/{worker}', [WorkerController::class, 'delete_add_diplom'])->name('delete_add_diplom');
523 524
524 // Добавление стандартного диплома 525 // Добавление стандартного диплома
525 Route::get('кабинет/add_document/{worker}', [WorkerController::class, 'add_document'])->name('add_document'); 526 Route::get('кабинет/add_document/{worker}', [WorkerController::class, 'add_document'])->name('add_document');
526 Route::post('кабинет/add_document/', [WorkerController::class, 'add_document_save'])->name('add_document_save'); 527 Route::post('кабинет/add_document/', [WorkerController::class, 'add_document_save'])->name('add_document_save');
527 Route::get('кабинет/edit_document/{doc}/{worker}', [WorkerController::class, 'edit_document'])->name('edit_document'); 528 Route::get('кабинет/edit_document/{doc}/{worker}', [WorkerController::class, 'edit_document'])->name('edit_document');
528 Route::post('кабинет/edit_document/{doc}', [WorkerController::class, 'edit_document_save'])->name('edit_document_save'); 529 Route::post('кабинет/edit_document/{doc}', [WorkerController::class, 'edit_document_save'])->name('edit_document_save');
529 Route::get('кабинет/delete_document/{doc}', [WorkerController::class, 'delete_document'])->name('delete_document'); 530 Route::get('кабинет/delete_document/{doc}', [WorkerController::class, 'delete_document'])->name('delete_document');
530 531
531 // Отправка сообщения работодателю от соискателя 532 // Отправка сообщения работодателю от соискателя
532 Route::post('сообщение/', [WorkerController::class, 'new_message']) 533 Route::post('сообщение/', [WorkerController::class, 'new_message'])
533 ->withoutMiddleware('is_worker') 534 ->withoutMiddleware('is_worker')
534 ->name('new_message'); 535 ->name('new_message');
535 536
536 Route::get('cabinet/autoresponder', [WorkerController::class, 'autoresponder'])->name('autoresponder'); 537 Route::get('cabinet/autoresponder', [WorkerController::class, 'autoresponder'])->name('autoresponder');
537 Route::get('cabinet/autoresponder_save', [WorkerController::class, 'autoresponderSave'])->name('autoresponder_save'); 538 Route::get('cabinet/autoresponder_save', [WorkerController::class, 'autoresponderSave'])->name('autoresponder_save');
538 539
539 Route::get('cabinet/autolift', [WorkerController::class, 'resumeAutoLiftForm'])->name('autolift'); 540 Route::get('cabinet/autolift', [WorkerController::class, 'resumeAutoLiftForm'])->name('autolift');
540 Route::post('cabinet/autolift/save', [WorkerController::class, 'resumeAutoLiftSave'])->name('autolift_save'); 541 Route::post('cabinet/autolift/save', [WorkerController::class, 'resumeAutoLiftSave'])->name('autolift_save');
541 }); 542 });
542 Route::post('/admin/chat/response', [WorkerController::class, 'adminChatResponse'])->name('admin.chat.response'); 543 Route::post('/admin/chat/response', [WorkerController::class, 'adminChatResponse'])->name('admin.chat.response');
543 544
544 // Личный кабинет работодателя 545 // Личный кабинет работодателя
545 Route::group([ 546 Route::group([
546 'as' => 'employer.', // имя маршрута, например auth.index 547 'as' => 'employer.', // имя маршрута, например auth.index
547 'prefix' => 'employer', // префикс маршрута, например auth/index 548 'prefix' => 'employer', // префикс маршрута, например auth/index
548 'middleware' => ['auth', 'is_employer'], 549 'middleware' => ['auth', 'is_employer'],
549 ], function() { 550 ], function() {
550 // 0 страница - Личные данные работодателя 551 // 0 страница - Личные данные работодателя
551 Route::get('cabinet/employer_info', [EmployerController::class, 'employer_info'])->name('employer_info'); 552 Route::get('cabinet/employer_info', [EmployerController::class, 'employer_info'])->name('employer_info');
552 Route::post('cabinet/employer_info/{user}', [EmployerController::class, 'employer_info_save'])->name('employer_info_save'); 553 Route::post('cabinet/employer_info/{user}', [EmployerController::class, 'employer_info_save'])->name('employer_info_save');
553 554
554 // 1 страница - Профиль 555 // 1 страница - Профиль
555 Route::get('cabinet', [EmployerController::class, 'cabinet'])->name('cabinet'); 556 Route::get('cabinet', [EmployerController::class, 'cabinet'])->name('cabinet');
556 Route::post('cabinet/{Employer}', [EmployerController::class, 'cabinet_save'])->name('cabinet_save'); 557 Route::post('cabinet/{Employer}', [EmployerController::class, 'cabinet_save'])->name('cabinet_save');
557 Route::post('flot_add_ajax', [EmployerController::class, 'save_add_flot'])->name('save_add_flot'); 558 Route::post('flot_add_ajax', [EmployerController::class, 'save_add_flot'])->name('save_add_flot');
558 Route::get('flot_delete_ajax/{Flot}', [EmployerController::class, 'delete_flot'])->name('delete_flot'); 559 Route::get('flot_delete_ajax/{Flot}', [EmployerController::class, 'delete_flot'])->name('delete_flot');
559 Route::get('cabinet/flot_edit/{Flot}/{Employer}', [EmployerController::class, 'edit_flot'])->name('edit_flot'); 560 Route::get('cabinet/flot_edit/{Flot}/{Employer}', [EmployerController::class, 'edit_flot'])->name('edit_flot');
560 Route::post('cabinet/flot_edit/{Flot}', [EmployerController::class, 'update_flot'])->name('update_flot_save'); 561 Route::post('cabinet/flot_edit/{Flot}', [EmployerController::class, 'update_flot'])->name('update_flot_save');
561 Route::get('cabinet/flot', [EmployerController::class, 'slider_flot'])->name('slider_flot'); 562 Route::get('cabinet/flot', [EmployerController::class, 'slider_flot'])->name('slider_flot');
562 563
563 Route::get('social/{social}/{vacancy}', [Ad_jobsController::class, 'sendVacancyToSocial']) 564 Route::get('social/{social}/{vacancy}', [Ad_jobsController::class, 'sendVacancyToSocial'])
564 ->name('send-vacancy-to-social'); 565 ->name('send-vacancy-to-social');
565 566
566 // 2 страница - Добавление вакансий 567 // 2 страница - Добавление вакансий
567 Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie'); 568 Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie');
568 Route::post('vacancie', [EmployerController::class, 'cabinet_vacancy_save1'])->name('vac_save'); 569 Route::post('vacancie', [EmployerController::class, 'cabinet_vacancy_save1'])->name('vac_save');
569 //Route::get('selected_people', [EmployerController::class, 'selected_people'])->name('selected_people'); 570 //Route::get('selected_people', [EmployerController::class, 'selected_people'])->name('selected_people');
570 571
571 Route::get('cabinet/vacancie_danger', [EmployerController::class, 'cabinet_vacancie_danger'])->name('cabinet_vacancie_danger'); 572 Route::get('cabinet/vacancie_danger', [EmployerController::class, 'cabinet_vacancie_danger'])->name('cabinet_vacancie_danger');
572 573
573 574
574 575
575 Route::get('selected_people', [EmployerController::class, 'selected_people'])->name('selected_people'); 576 Route::get('selected_people', [EmployerController::class, 'selected_people'])->name('selected_people');
576 577
577 // 3 страница - Мои вакансии 578 // 3 страница - Мои вакансии
578 Route::get('cabinet/vacancy_list', [EmployerController::class, 'vacancy_list'])->name('vacancy_list'); 579 Route::get('cabinet/vacancy_list', [EmployerController::class, 'vacancy_list'])->name('vacancy_list');
579 Route::get('cabinet/vacancy/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); 580 Route::get('cabinet/vacancy/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit');
580 Route::get('cabinet/vacancy-delete/{ad_employer}', [EmployerController::class, 'vacancy_delete'])->name('vacancy_delete'); 581 Route::get('cabinet/vacancy-delete/{ad_employer}', [EmployerController::class, 'vacancy_delete'])->name('vacancy_delete');
581 Route::get('cabinet/vacancy-up/{ad_employer}', [EmployerController::class, 'vacancy_up'])->name('vacancy_up'); 582 Route::get('cabinet/vacancy-up/{ad_employer}', [EmployerController::class, 'vacancy_up'])->name('vacancy_up');
582 Route::get('cabinet/vacancy-eye/{ad_employer}/{status}', [EmployerController::class, 'vacancy_eye'])->name('vacancy_eye'); 583 Route::get('cabinet/vacancy-eye/{ad_employer}/{status}', [EmployerController::class, 'vacancy_eye'])->name('vacancy_eye');
583 Route::get('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); 584 Route::get('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit');
584 Route::post('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_save_me'])->name('vacancy_save_me'); 585 Route::post('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_save_me'])->name('vacancy_save_me');
585 586
586 // 4.1Ю. 587 // 4.1Ю.
587 Route::get('cabinet/ad_jobs/create/{ad_employer}', [Ad_jobsController::class, 'add_job_in_vac'])->name('add_job_in_vac'); 588 Route::get('cabinet/ad_jobs/create/{ad_employer}', [Ad_jobsController::class, 'add_job_in_vac'])->name('add_job_in_vac');
588 Route::post('cabinet/ad_jobs/create', [Ad_jobsController::class, 'add_job_in_vac_save'])->name('add_job_in_vac_save'); 589 Route::post('cabinet/ad_jobs/create', [Ad_jobsController::class, 'add_job_in_vac_save'])->name('add_job_in_vac_save');
589 Route::get('cabinet/ad_jobs/edit/{ad_job}/{ad_employer}', [Ad_jobsController::class, 'edit_job_in_vac'])->name('edit_job_in_vac'); 590 Route::get('cabinet/ad_jobs/edit/{ad_job}/{ad_employer}', [Ad_jobsController::class, 'edit_job_in_vac'])->name('edit_job_in_vac');
590 Route::post('cabinet/ad_jobs/edit/{ad_job}', [Ad_jobsController::class, 'edit_job_in_vac_save'])->name('edit_job_in_vac_save'); 591 Route::post('cabinet/ad_jobs/edit/{ad_job}', [Ad_jobsController::class, 'edit_job_in_vac_save'])->name('edit_job_in_vac_save');
591 Route::get('cabinet/ad_jobs/delete/{ad_job}', [Ad_jobsController::class, 'delete_job_in_vac'])->name('delete_job_in_vac'); 592 Route::get('cabinet/ad_jobs/delete/{ad_job}', [Ad_jobsController::class, 'delete_job_in_vac'])->name('delete_job_in_vac');
592 593
593 // 4 страница - Отклики на вакансии 594 // 4 страница - Отклики на вакансии
594 Route::get('cabinet/answers/{employer}', [EmployerController::class, 'answers'])->name('answers'); 595 Route::get('cabinet/answers/{employer}', [EmployerController::class, 'answers'])->name('answers');
595 Route::get('cabinet/status/{employer}', [EmployerController::class, 'supple_status2'])->name('supple'); 596 Route::get('cabinet/status/{employer}', [EmployerController::class, 'supple_status2'])->name('supple');
596 Route::get('status/{employer}/{ad_response}/{flag}', [EmployerController::class, 'supple_status'])->name('status_msg'); 597 Route::get('status/{employer}/{ad_response}/{flag}', [EmployerController::class, 'supple_status'])->name('status_msg');
597 598
598 // 5 страница - Сообщения 599 // 5 страница - Сообщения
599 Route::get('cabinet/messages/{type_message}', [EmployerController::class, 'messages'])->name('messages'); 600 Route::get('cabinet/messages/{type_message}', [EmployerController::class, 'messages'])->name('messages');
600 Route::get('cabinet/dialog/{chat}', [EmployerController::class, 'dialog'])->name('dialog'); 601 Route::get('cabinet/dialog/{chat}', [EmployerController::class, 'dialog'])->name('dialog');
601 Route::post('cabinet/send-message', [EmployerController::class, 'send_message'])->name('send_message'); 602 Route::post('cabinet/send-message', [EmployerController::class, 'send_message'])->name('send_message');
602 Route::post('test123', [EmployerController::class, 'test123'])->name('test123'); 603 Route::post('test123', [EmployerController::class, 'test123'])->name('test123');
603 604
604 // 6 страница - Избранный 605 // 6 страница - Избранный
605 Route::get('cabinet/favorites', [EmployerController::class, 'favorites'])->name('favorites'); 606 Route::get('cabinet/favorites', [EmployerController::class, 'favorites'])->name('favorites');
606 607
607 Route::get('cabinet/autolift', [EmployerController::class, 'vacancyAutoLiftForm'])->name('autolift'); 608 Route::get('cabinet/autolift', [EmployerController::class, 'vacancyAutoLiftForm'])->name('autolift');
608 Route::post('cabinet/autolift/save', [EmployerController::class, 'vacancyAutoLiftSave'])->name('autolift_save'); 609 Route::post('cabinet/autolift/save', [EmployerController::class, 'vacancyAutoLiftSave'])->name('autolift_save');
609 610
610 //7 страница - База данных 611 //7 страница - База данных
611 Route::get('cabinet/bd', [EmployerController::class, 'bd'])->name('bd'); 612 Route::get('cabinet/bd', [EmployerController::class, 'bd'])->name('bd');
612 613
613 //8 страница - База резюме 614 //8 страница - База резюме
614 Route::get('cabinet/bd-tupe', [EmployerController::class, 'bd_tupe'])->name('bd-tupe'); 615 Route::get('cabinet/bd-tupe', [EmployerController::class, 'bd_tupe'])->name('bd-tupe');
615 616
616 // 9 рассылка сообщений 617 // 9 рассылка сообщений
617 Route::get('cabinet/send-all-messages', [EmployerController::class, 'send_all_messages'])->name('send_all_messages'); 618 Route::get('cabinet/send-all-messages', [EmployerController::class, 'send_all_messages'])->name('send_all_messages');
618 Route::post('cabinet/send-all-messages/send', [EmployerController::class, 'send_all_post'])->name('send_all_post'); 619 Route::post('cabinet/send-all-messages/send', [EmployerController::class, 'send_all_post'])->name('send_all_post');
619 620
620 // 10 страница FAQ вопрос 621 // 10 страница FAQ вопрос
621 Route::get('cabinet/faq', [FaqController::class, 'showListForUser'])->name('faq'); 622 Route::get('cabinet/faq', [FaqController::class, 'showListForUser'])->name('faq');
622 623
623 Route::get('cabinet/autoresponder', [EmployerController::class, 'autoresponder'])->name('autoresponder'); 624 Route::get('cabinet/autoresponder', [EmployerController::class, 'autoresponder'])->name('autoresponder');
624 Route::get('cabinet/autoresponder_save', [EmployerController::class, 'autoresponderSave'])->name('autoresponder_save'); 625 Route::get('cabinet/autoresponder_save', [EmployerController::class, 'autoresponderSave'])->name('autoresponder_save');
625 626
626 // 11 страница - Настройка уведомлений 627 // 11 страница - Настройка уведомлений
627 Route::get('cabinet/subscribe', [EmployerController::class, 'subscribe'])->name('subscribe'); 628 Route::get('cabinet/subscribe', [EmployerController::class, 'subscribe'])->name('subscribe');
628 Route::post('cabinet/subscribe/save', [EmployerController::class, 'save_subscribe'])->name('save_subscribe'); 629 Route::post('cabinet/subscribe/save', [EmployerController::class, 'save_subscribe'])->name('save_subscribe');
629 630
630 // 12 страница - Сменить пароль 631 // 12 страница - Сменить пароль
631 Route::get('cabinet/password-reset', [EmployerController::class, 'password_reset'])->name('password_reset'); 632 Route::get('cabinet/password-reset', [EmployerController::class, 'password_reset'])->name('password_reset');
632 Route::get('cabinet/password-reset/new', [EmployerController::class, 'new_password'])->name('new_password'); 633 Route::get('cabinet/password-reset/new', [EmployerController::class, 'new_password'])->name('new_password');
633 634
634 // 13 страница - Удаление профиля 635 // 13 страница - Удаление профиля
635 Route::get('cabinet/delete-people', [EmployerController::class, 'delete_people'])->name('delete_people'); 636 Route::get('cabinet/delete-people', [EmployerController::class, 'delete_people'])->name('delete_people');
636 Route::get('cabinet/action-delete-people', [EmployerController::class, 'action_delete_user'])->name('action_delete_user'); 637 Route::get('cabinet/action-delete-people', [EmployerController::class, 'action_delete_user'])->name('action_delete_user');
637 Route::get('cabinet/action-ajax-delete-people', [EmployerController::class, 'ajax_delete_user'])->name('ajax_delete_user'); 638 Route::get('cabinet/action-ajax-delete-people', [EmployerController::class, 'ajax_delete_user'])->name('ajax_delete_user');
638 639
639 // Отправил сообщение 640 // Отправил сообщение
640 Route::post('сообщение/', [EmployerController::class, 'new_message']) 641 Route::post('сообщение/', [EmployerController::class, 'new_message'])
641 ->withoutMiddleware('is_employer') 642 ->withoutMiddleware('is_employer')
642 ->name('new_message'); 643 ->name('new_message');
643 644
644 Route::post('pin_chat/', [EmployerController::class, 'pin_chat'])->name('pin_chat'); 645 Route::post('pin_chat/', [EmployerController::class, 'pin_chat'])->name('pin_chat');
645 Route::post('remove_chat/', [EmployerController::class, 'remove_chat'])->name('remove_chat'); 646 Route::post('remove_chat/', [EmployerController::class, 'remove_chat'])->name('remove_chat');
646 }); 647 });
647 648
648 Route::get('TestWorker', [WorkerController::class, 'TestWorker'])->name('TestWorker'); 649 Route::get('TestWorker', [WorkerController::class, 'TestWorker'])->name('TestWorker');
649 650
650 Route::post('send_message', [HomeController::class, 'send_message'])->name('send_message'); 651 Route::post('send_message', [HomeController::class, 'send_message'])->name('send_message');
651 652
652 653