Commit 142d287bd2121b81beccd97aa148f5aa0284ee0c

Authored by Андрей Ларионов
1 parent 60451bb512

Шаблоны кабинета работника

Showing 11 changed files with 223 additions and 51 deletions Inline Diff

app/Http/Controllers/EmployerController.php
1 <?php 1 <?php
2 2
3 namespace App\Http\Controllers; 3 namespace App\Http\Controllers;
4 4
5 use App\Classes\RusDate; 5 use App\Classes\RusDate;
6 use App\Classes\Tools; 6 use App\Classes\Tools;
7 use App\Http\Requests\FlotRequest; 7 use App\Http\Requests\FlotRequest;
8 use App\Http\Requests\MessagesRequiest; 8 use App\Http\Requests\MessagesRequiest;
9 use App\Http\Requests\VacansiaRequiest; 9 use App\Http\Requests\VacansiaRequiest;
10 use App\Mail\MailSotrudnichestvo; 10 use App\Mail\MailSotrudnichestvo;
11 use App\Mail\SendAllMessages; 11 use App\Mail\SendAllMessages;
12 use App\Models\Ad_employer; 12 use App\Models\Ad_employer;
13 use App\Models\Ad_jobs; 13 use App\Models\Ad_jobs;
14 use App\Models\ad_response; 14 use App\Models\ad_response;
15 use App\Models\Category; 15 use App\Models\Category;
16 use App\Models\Education; 16 use App\Models\Education;
17 use App\Models\Employer; 17 use App\Models\Employer;
18 use App\Models\employers_main; 18 use App\Models\employers_main;
19 use App\Models\Flot; 19 use App\Models\Flot;
20 use App\Models\Job_title; 20 use App\Models\Job_title;
21 use App\Models\Message; 21 use App\Models\Message;
22 use App\Models\Worker; 22 use App\Models\Worker;
23 use Illuminate\Database\Eloquent\Builder; 23 use Illuminate\Database\Eloquent\Builder;
24 use Illuminate\Foundation\Auth\User; 24 use Illuminate\Foundation\Auth\User;
25 use Illuminate\Http\Request; 25 use Illuminate\Http\Request;
26 use Illuminate\Support\Facades\Auth; 26 use Illuminate\Support\Facades\Auth;
27 use Illuminate\Support\Facades\Hash; 27 use Illuminate\Support\Facades\Hash;
28 use Illuminate\Support\Facades\Mail; 28 use Illuminate\Support\Facades\Mail;
29 use Illuminate\Support\Facades\Storage; 29 use Illuminate\Support\Facades\Storage;
30 use App\Models\User as User_Model; 30 use App\Models\User as User_Model;
31 use Illuminate\Support\Facades\Validator; 31 use Illuminate\Support\Facades\Validator;
32 32
33 class EmployerController extends Controller 33 class EmployerController extends Controller
34 { 34 {
35 public function vacancie($vacancy, Request $request) { 35 public function vacancie($vacancy, Request $request) {
36 $title = 'Заголовок вакансии'; 36 $title = 'Заголовок вакансии';
37 37
38 $Query = Ad_employer::with('jobs')-> 38 $Query = Ad_employer::with('jobs')->
39 with('cat')-> 39 with('cat')->
40 with('employer')-> 40 with('employer')->
41 with('jobs_code')-> 41 with('jobs_code')->
42 select('ad_employers.*')-> 42 select('ad_employers.*')->
43 where('id', '=', $vacancy)->get(); 43 where('id', '=', $vacancy)->get();
44 44
45 $title = $Query[0]->name; 45 $title = $Query[0]->name;
46 if ($request->ajax()) { 46 if ($request->ajax()) {
47 return view('ajax.vacance-item', compact('Query')); 47 return view('ajax.vacance-item', compact('Query'));
48 } else { 48 } else {
49 return view('vacance-item', compact('title', 'Query')); 49 return view('vacance-item', compact('title', 'Query'));
50 } 50 }
51 } 51 }
52 52
53 public function logout() { 53 public function logout() {
54 Auth::logout(); 54 Auth::logout();
55 return redirect()->route('index') 55 return redirect()->route('index')
56 ->with('success', 'Вы вышли из личного кабинета'); 56 ->with('success', 'Вы вышли из личного кабинета');
57 } 57 }
58 58
59 public function cabinet() { 59 public function cabinet() {
60 $id = Auth()->user()->id; 60 $id = Auth()->user()->id;
61 $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> 61 $Employer = Employer::query()->with('users')->with('ads')->with('flots')->
62 WhereHas('users', 62 WhereHas('users',
63 function (Builder $query) use ($id) {$query->Where('id', $id); 63 function (Builder $query) use ($id) {$query->Where('id', $id);
64 })->get(); 64 })->get();
65 return view('employers.cabinet45', compact('Employer')); 65 return view('employers.cabinet45', compact('Employer'));
66 } 66 }
67 67
68 public function cabinet_save(Employer $Employer, Request $request) { 68 public function cabinet_save(Employer $Employer, Request $request) {
69 $params = $request->all(); 69 $params = $request->all();
70 $params['user_id'] = Auth()->user()->id; 70 $params['user_id'] = Auth()->user()->id;
71 $id = $Employer->id; 71 $id = $Employer->id;
72 72
73 if ($request->has('logo')) { 73 if ($request->has('logo')) {
74 if (!empty($Employer->logo)) { 74 if (!empty($Employer->logo)) {
75 Storage::delete($Employer->logo); 75 Storage::delete($Employer->logo);
76 } 76 }
77 $params['logo'] = $request->file('logo')->store("employer/$id", 'public'); 77 $params['logo'] = $request->file('logo')->store("employer/$id", 'public');
78 } 78 }
79 79
80 $Employer->update($params); 80 $Employer->update($params);
81 81
82 return redirect()->route('employer.cabinet')->with('success', 'Данные были успешно сохранены'); 82 return redirect()->route('employer.cabinet')->with('success', 'Данные были успешно сохранены');
83 } 83 }
84 84
85 public function save_add_flot(FlotRequest $request) { 85 public function save_add_flot(FlotRequest $request) {
86 // отмена 86 // отмена
87 $params = $request->all(); 87 $params = $request->all();
88 88
89 if ($request->has('image')) { 89 if ($request->has('image')) {
90 $params['image'] = $request->file('image')->store("flot", 'public'); 90 $params['image'] = $request->file('image')->store("flot", 'public');
91 } 91 }
92 Flot::create($params); 92 Flot::create($params);
93 $data_flots = Flot::query()->where('employer_id', $request->get('employer_if'))->get(); 93 $data_flots = Flot::query()->where('employer_id', $request->get('employer_if'))->get();
94 return redirect()->route('employer.cabinet')->with('success', 'Новый корабль был добавлен'); 94 return redirect()->route('employer.cabinet')->with('success', 'Новый корабль был добавлен');
95 } 95 }
96 96
97 public function delete_flot(Flot $Flot) { 97 public function delete_flot(Flot $Flot) {
98 $data_flots = Flot::query()->where('employer_id', $Flot->employer_id)->get(); 98 $data_flots = Flot::query()->where('employer_id', $Flot->employer_id)->get();
99 99
100 if (isset($Flot->id)) $Flot->delete(); 100 if (isset($Flot->id)) $Flot->delete();
101 return redirect()->route('employer.cabinet')->with('success', 'Корабль был удален'); 101 return redirect()->route('employer.cabinet')->with('success', 'Корабль был удален');
102 } 102 }
103 103
104 // Форма добавления вакансий 104 // Форма добавления вакансий
105 public function cabinet_vacancie() { 105 public function cabinet_vacancie() {
106 $id = Auth()->user()->id; 106 $id = Auth()->user()->id;
107 $jobs = Job_title::query()->OrderBy('name')->get(); 107 $jobs = Job_title::query()->OrderBy('name')->get();
108 108
109 $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> 109 $Employer = Employer::query()->with('users')->with('ads')->with('flots')->
110 WhereHas('users', 110 WhereHas('users',
111 function (Builder $query) use ($id) {$query->Where('id', $id); 111 function (Builder $query) use ($id) {$query->Where('id', $id);
112 })->get(); 112 })->get();
113 113
114 return view('employers.add_vacancy', compact('Employer', 'jobs')); 114 return view('employers.add_vacancy', compact('Employer', 'jobs'));
115 } 115 }
116 116
117 // Сохранение вакансии 117 // Сохранение вакансии
118 public function cabinet_vacancy_save1(VacansiaRequiest $request) { 118 public function cabinet_vacancy_save1(VacansiaRequiest $request) {
119 $params = $request->all(); 119 $params = $request->all();
120 $jobs['min_salary'] = $params['min_salary']; 120 $jobs['min_salary'] = $params['min_salary'];
121 $jobs['max_salary'] = $params['max_salary']; 121 $jobs['max_salary'] = $params['max_salary'];
122 $jobs['flot'] = $params['flot']; 122 $jobs['flot'] = $params['flot'];
123 $jobs['power'] = $params['power']; 123 $jobs['power'] = $params['power'];
124 $jobs['sytki'] = $params['sytki']; 124 $jobs['sytki'] = $params['sytki'];
125 $jobs['start'] = $params['start']; 125 $jobs['start'] = $params['start'];
126 $jobs['job_title_id'] = $params['job_title_id']; 126 $jobs['job_title_id'] = $params['job_title_id'];
127 $jobs['description'] = $params['description']; 127 $jobs['description'] = $params['description'];
128 $jobs['region'] = $params['city']; 128 $jobs['region'] = $params['city'];
129 unset($params['min_salary']); 129 unset($params['min_salary']);
130 unset($params['max_salary']); 130 unset($params['max_salary']);
131 unset($params['flot']); 131 unset($params['flot']);
132 unset($params['sytki']); 132 unset($params['sytki']);
133 unset($params['start']); 133 unset($params['start']);
134 unset($params['job_title_id']); 134 unset($params['job_title_id']);
135 unset($params['description']); 135 unset($params['description']);
136 136
137 $id = Ad_employer::create($params)->id; 137 $id = Ad_employer::create($params)->id;
138 $jobs['ad_employer_id'] = $id; 138 $jobs['ad_employer_id'] = $id;
139 Ad_jobs::create($jobs); 139 Ad_jobs::create($jobs);
140 140
141 return redirect()->route('employer.cabinet_vacancie'); 141 return redirect()->route('employer.cabinet_vacancie');
142 } 142 }
143 143
144 // Список вакансий 144 // Список вакансий
145 public function vacancy_list(Request $request) { 145 public function vacancy_list(Request $request) {
146 $id = Auth()->user()->id; 146 $id = Auth()->user()->id;
147 $Employer = Employer::query()->where('user_id', $id)->first(); 147 $Employer = Employer::query()->where('user_id', $id)->first();
148 $vacancy_list = Ad_employer::query()->where('employer_id', $Employer->id)->OrderByDESC('updated_at')->get(); 148 $vacancy_list = Ad_employer::query()->where('employer_id', $Employer->id)->OrderByDESC('updated_at')->get();
149 149
150 return view('employers.list_vacancy', compact('vacancy_list', 'Employer')); 150 return view('employers.list_vacancy', compact('vacancy_list', 'Employer'));
151 } 151 }
152 152
153 // Карточка вакансии 153 // Карточка вакансии
154 public function vacancy_edit(Ad_employer $ad_employer) { 154 public function vacancy_edit(Ad_employer $ad_employer) {
155 $id = Auth()->user()->id; 155 $id = Auth()->user()->id;
156 $jobs = Job_title::query()->OrderBy('name')->get(); 156 $jobs = Job_title::query()->OrderBy('name')->get();
157 $Employer = Employer::query()->where('user_id', $id)->first(); 157 $Employer = Employer::query()->where('user_id', $id)->first();
158 158
159 return view('employers.edit_vacancy', compact('ad_employer', 'Employer', 'jobs')); 159 return view('employers.edit_vacancy', compact('ad_employer', 'Employer', 'jobs'));
160 } 160 }
161 161
162 // Сохранение карточки вакансии 162 // Сохранение карточки вакансии
163 public function vacancy_save(Request $request, Ad_employer $ad_employer) { 163 public function vacancy_save(Request $request, Ad_employer $ad_employer) {
164 $all = $request->all(); 164 $all = $request->all();
165 $ad_employer->update($all); 165 $ad_employer->update($all);
166 return redirect()->route('employer.cabinet_vacancie'); 166 return redirect()->route('employer.cabinet_vacancie');
167 } 167 }
168 168
169 // Удаление карточки вакансии 169 // Удаление карточки вакансии
170 public function vacancy_delete(Ad_employer $ad_employer) { 170 public function vacancy_delete(Ad_employer $ad_employer) {
171 $ad_employer->delete(); 171 $ad_employer->delete();
172 172
173 return redirect()->route('employer.vacancy_list') 173 return redirect()->route('employer.vacancy_list')
174 ->with('success', 'Данные были успешно сохранены'); 174 ->with('success', 'Данные были успешно сохранены');
175 } 175 }
176 176
177 // Обновление даты 177 // Обновление даты
178 public function vacancy_up(Ad_employer $ad_employer) { 178 public function vacancy_up(Ad_employer $ad_employer) {
179 $up = date('m/d/Y h:i:s', time());; 179 $up = date('m/d/Y h:i:s', time());;
180 $vac_emp = Ad_employer::findOrFail($ad_employer->id); 180 $vac_emp = Ad_employer::findOrFail($ad_employer->id);
181 $vac_emp->updated_at = $up; 181 $vac_emp->updated_at = $up;
182 $vac_emp->save(); 182 $vac_emp->save();
183 183
184 return redirect()->route('employer.vacancy_list'); 184 return redirect()->route('employer.vacancy_list');
185 // начало конца 185 // начало конца
186 } 186 }
187 187
188 //Видимость вакансии 188 //Видимость вакансии
189 public function vacancy_eye(Ad_employer $ad_employer, $status) { 189 public function vacancy_eye(Ad_employer $ad_employer, $status) {
190 $vac_emp = Ad_employer::findOrFail($ad_employer->id); 190 $vac_emp = Ad_employer::findOrFail($ad_employer->id);
191 $vac_emp->active_is = $status; 191 $vac_emp->active_is = $status;
192 $vac_emp->save(); 192 $vac_emp->save();
193 193
194 return redirect()->route('employer.vacancy_list'); 194 return redirect()->route('employer.vacancy_list');
195 } 195 }
196 196
197 //Вакансия редактирования (шаблон) 197 //Вакансия редактирования (шаблон)
198 public function vacancy_update(Ad_employer $id) { 198 public function vacancy_update(Ad_employer $id) {
199 199
200 } 200 }
201 201
202 //Отклики на вакансию - лист 202 //Отклики на вакансию - лист
203 public function answers(Employer $employer, Request $request) { 203 public function answers(Employer $employer, Request $request) {
204 $user_id = Auth()->user()->id; 204 $user_id = Auth()->user()->id;
205 $answer = Ad_employer::query()->where('employer_id', $employer->id); 205 $answer = Ad_employer::query()->where('employer_id', $employer->id);
206 if ($request->has('search')) { 206 if ($request->has('search')) {
207 $search = trim($request->get('search')); 207 $search = trim($request->get('search'));
208 if (!empty($search)) $answer = $answer->where('name', 'LIKE', "%$search%"); 208 if (!empty($search)) $answer = $answer->where('name', 'LIKE', "%$search%");
209 } 209 }
210 210
211 $answer = $answer->with('response')->get(); 211 $answer = $answer->with('response')->get();
212 212
213 return view('employers.list_answer', compact('answer', 'user_id', 'employer')); 213 return view('employers.list_answer', compact('answer', 'user_id', 'employer'));
214 } 214 }
215 215
216 //Обновление статуса 216 //Обновление статуса
217 public function supple_status(employer $employer, ad_response $ad_response, $flag) { 217 public function supple_status(employer $employer, ad_response $ad_response, $flag) {
218 $ad_response->update(Array('flag' => $flag)); 218 $ad_response->update(Array('flag' => $flag));
219 return redirect()->route('employer.answers', ['employer' => $employer->id]); 219 return redirect()->route('employer.answers', ['employer' => $employer->id]);
220 } 220 }
221 221
222 //Страницы сообщений список 222 //Страницы сообщений список
223 public function messages($type_message) { 223 public function messages($type_message) {
224 $user_id = Auth()->user()->id; 224 $user_id = Auth()->user()->id;
225 225
226 $messages_input = Message::query()->with('vacancies')->with('user_from')-> 226 $messages_input = Message::query()->with('vacancies')->with('user_from')->
227 Where('to_user_id', $user_id)->OrderByDesc('created_at'); 227 Where('to_user_id', $user_id)->OrderByDesc('created_at');
228 228
229 $messages_output = Message::query()->with('vacancies')-> 229 $messages_output = Message::query()->with('vacancies')->
230 with('user_to')->where('user_id', $user_id)-> 230 with('user_to')->where('user_id', $user_id)->
231 OrderByDesc('created_at'); 231 OrderByDesc('created_at');
232 232
233 233
234 $count_input = $messages_input->count(); 234 $count_input = $messages_input->count();
235 $count_output = $messages_output->count(); 235 $count_output = $messages_output->count();
236 236
237 if ($type_message == 'input') { 237 if ($type_message == 'input') {
238 $messages = $messages_input->paginate(15); 238 $messages = $messages_input->paginate(15);
239 } 239 }
240 240
241 if ($type_message == 'output') { 241 if ($type_message == 'output') {
242 $messages = $messages_output->paginate(15); 242 $messages = $messages_output->paginate(15);
243 } 243 }
244 244
245 return view('employers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id')); 245 return view('employers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id'));
246 } 246 }
247 247
248 // Диалог между пользователями 248 // Диалог между пользователями
249 public function dialog(User_Model $user1, User_Model $user2) { 249 public function dialog(User_Model $user1, User_Model $user2) {
250 if (isset($user2->id)) { 250 if (isset($user2->id)) {
251 $companion = User_Model::query()->with('workers')-> 251 $companion = User_Model::query()->with('workers')->
252 with('employers')-> 252 with('employers')->
253 where('id', $user2->id)->first(); 253 where('id', $user2->id)->first();
254 } 254 }
255 255
256 $Messages = Message::query()->with('response')->where(function($query) use ($user1, $user2) { 256 $Messages = Message::query()->with('response')->where(function($query) use ($user1, $user2) {
257 $query->where('user_id', $user1->id)->where('to_user_id', $user2->id); 257 $query->where('user_id', $user1->id)->where('to_user_id', $user2->id);
258 })->orWhere(function($query) use ($user1, $user2) { 258 })->orWhere(function($query) use ($user1, $user2) {
259 $query->where('user_id', $user2->id)->where('to_user_id', $user1->id); 259 $query->where('user_id', $user2->id)->where('to_user_id', $user1->id);
260 })->OrderBy('created_at')->get(); 260 })->OrderBy('created_at')->get();
261 261
262 $id_vac = null; 262 $id_vac = null;
263 foreach ($Messages as $it) { 263 foreach ($Messages as $it) {
264 if (isset($it->response)) { 264 if (isset($it->response)) {
265 foreach ($it->response as $r) { 265 foreach ($it->response as $r) {
266 if (isset($r->ad_employer_id)) { 266 if (isset($r->ad_employer_id)) {
267 $id_vac = $r->ad_employer_id; 267 $id_vac = $r->ad_employer_id;
268 break; 268 break;
269 } 269 }
270 } 270 }
271 } 271 }
272 if (!is_null($id_vac)) break; 272 if (!is_null($id_vac)) break;
273 } 273 }
274 274
275 $ad_employer = null; 275 $ad_employer = null;
276 if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first(); 276 if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first();
277 $sender = $user1; 277 $sender = $user1;
278 278
279 return view('employers.dialog', compact('companion', 'sender', 'Messages', 'ad_employer')); 279 return view('employers.dialog', compact('companion', 'sender', 'Messages', 'ad_employer'));
280 } 280 }
281 281
282 // Отправка сообщения от работодателя 282 // Отправка сообщения от работодателя
283 public function send_message(MessagesRequiest $request) { 283 public function send_message(MessagesRequiest $request) {
284 $params = $request->all(); 284 $params = $request->all();
285 dd($params); 285 dd($params);
286 $user1 = $params['user_id']; 286 $user1 = $params['user_id'];
287 $user2 = $params['to_user_id']; 287 $user2 = $params['to_user_id'];
288 288
289 if ($request->has('file')) { 289 if ($request->has('file')) {
290 $params['file'] = $request->file('file')->store("messages", 'public'); 290 $params['file'] = $request->file('file')->store("messages", 'public');
291 } 291 }
292 Message::create($params); 292 Message::create($params);
293 return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]); 293 return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]);
294 } 294 }
295 295
296 public function test123(Request $request) { 296 public function test123(Request $request) {
297 $params = $request->all(); 297 $params = $request->all();
298 $user1 = $params['user_id']; 298 $user1 = $params['user_id'];
299 $user2 = $params['to_user_id']; 299 $user2 = $params['to_user_id'];
300 300
301 $rules = [ 301 $rules = [
302 'text' => 'required|min:1|max:150000', 302 'text' => 'required|min:1|max:150000',
303 'file' => 'file|mimes:doc,docx,xlsx,csv,txt,xlx,xls,pdf|max:150000' 303 'file' => 'file|mimes:doc,docx,xlsx,csv,txt,xlx,xls,pdf|max:150000'
304 ]; 304 ];
305 $messages = [ 305 $messages = [
306 'required' => 'Укажите обязательное поле', 306 'required' => 'Укажите обязательное поле',
307 'min' => [ 307 'min' => [
308 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 308 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
309 'integer' => 'Поле «:attribute» должно быть :min или больше', 309 'integer' => 'Поле «:attribute» должно быть :min или больше',
310 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 310 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
311 ], 311 ],
312 'max' => [ 312 'max' => [
313 'string' => 'Поле «:attribute» должно быть не больше :max символов', 313 'string' => 'Поле «:attribute» должно быть не больше :max символов',
314 'integer' => 'Поле «:attribute» должно быть :max или меньше', 314 'integer' => 'Поле «:attribute» должно быть :max или меньше',
315 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 315 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
316 ] 316 ]
317 ]; 317 ];
318 318
319 $validator = Validator::make($request->all(), $rules, $messages); 319 $validator = Validator::make($request->all(), $rules, $messages);
320 320
321 if ($validator->fails()) { 321 if ($validator->fails()) {
322 return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]) 322 return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2])
323 ->withErrors($validator); 323 ->withErrors($validator);
324 } else { 324 } else {
325 if ($request->has('file')) { 325 if ($request->has('file')) {
326 $params['file'] = $request->file('file')->store("messages", 'public'); 326 $params['file'] = $request->file('file')->store("messages", 'public');
327 } 327 }
328 Message::create($params); 328 Message::create($params);
329 return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]); 329 return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]);
330 330
331 } 331 }
332 } 332 }
333 333
334 //Избранные люди 334 //Избранные люди
335 public function favorites(Request $request) { 335 public function favorites(Request $request) {
336 if (isset($_COOKIE['favorite_worker'])) { 336 if (isset($_COOKIE['favorite_worker'])) {
337 $items = RusDate::count_item_fav(); 337 $items = RusDate::count_item_fav();
338 $it = $_COOKIE['favorite_worker']; 338 $it = $_COOKIE['favorite_worker'];
339 $it = str_replace('"', "", $it); 339 $it = str_replace('"', "", $it);
340 $it = str_replace('[', "", $it); 340 $it = str_replace('[', "", $it);
341 $it = str_replace(']', "", $it); 341 $it = str_replace(']', "", $it);
342 $Arr = explode(",", $it); 342 $Arr = explode(",", $it);
343 } else { 343 } else {
344 $Arr = Array(); 344 $Arr = Array();
345 } 345 }
346 346
347 $Workers = Worker::query(); 347 $Workers = Worker::query();
348 $Workers = $Workers->whereIn('id', $Arr); 348 $Workers = $Workers->whereIn('id', $Arr);
349 349
350 if (($request->has('search')) && (!empty($request->get('search')))) { 350 if (($request->has('search')) && (!empty($request->get('search')))) {
351 $search = $request->get('search'); 351 $search = $request->get('search');
352 352
353 $Workers = $Workers->WhereHas('users', 353 $Workers = $Workers->WhereHas('users',
354 function (Builder $query) use ($search) { 354 function (Builder $query) use ($search) {
355 $query->Where('surname', 'LIKE', "%$search%") 355 $query->Where('surname', 'LIKE', "%$search%")
356 ->orWhere('name_man', 'LIKE', "%$search%") 356 ->orWhere('name_man', 'LIKE', "%$search%")
357 ->orWhere('surname2', 'LIKE', "%$search%"); 357 ->orWhere('surname2', 'LIKE', "%$search%");
358 }); 358 });
359 } else { 359 } else {
360 $Workers = $Workers->with('users'); 360 $Workers = $Workers->with('users');
361 } 361 }
362 362
363 $Workers = $Workers->get(); 363 $Workers = $Workers->get();
364 return view('employers.favorite', compact('Workers')); 364 return view('employers.favorite', compact('Workers'));
365 } 365 }
366 366
367 // База данных 367 // База данных
368 public function bd(Request $request) { 368 public function bd(Request $request) {
369 // для типа BelongsTo 369 // для типа BelongsTo
370 //$documents = Document::query()->orderBy(Location::select('name') 370 //$documents = Document::query()->orderBy(Location::select('name')
371 // ->whereColumn('locations.id', 'documents.location_id') 371 // ->whereColumn('locations.id', 'documents.location_id')
372 //); 372 //);
373 373
374 // для типа HasOne/Many 374 // для типа HasOne/Many
375 // $documents = Document::::query()->orderBy(Location::select('name') 375 // $documents = Document::::query()->orderBy(Location::select('name')
376 // ->whereColumn('locations.document_id', 'documents.id') 376 // ->whereColumn('locations.document_id', 'documents.id')
377 //); 377 //);
378 378
379 $users = User_Model::query()->with('workers'); 379 $users = User_Model::query()->with('workers');
380 if (isset($request->find)) { 380 if (isset($request->find)) {
381 $find_key = $request->find; 381 $find_key = $request->find;
382 $users = $users->where('name', 'LIKE', "%$find_key%") 382 $users = $users->where('name', 'LIKE', "%$find_key%")
383 ->orWhere('email', 'LIKE', "%$find_key%") 383 ->orWhere('email', 'LIKE', "%$find_key%")
384 ->orWhere('telephone', 'LIKE', "%$find_key%"); 384 ->orWhere('telephone', 'LIKE', "%$find_key%");
385 } 385 }
386 386
387 // Данные 387 // Данные
388 $users = $users->Baseuser()-> 388 $users = $users->Baseuser()->
389 orderBy(Worker::select('position_work')->whereColumn('workers.user_id', 'users.id'))-> 389 orderBy(Worker::select('position_work')->whereColumn('Workers.user_id', 'users.id'))->
390 paginate(5); 390 paginate(5);
391 391
392 return view('employers.bd', compact('users')); 392 return view('employers.bd', compact('users'));
393 } 393 }
394 394
395 //Настройка уведомлений 395 //Настройка уведомлений
396 public function subscribe() { 396 public function subscribe() {
397 return view('employers.subcribe'); 397 return view('employers.subcribe');
398 } 398 }
399 399
400 //Установка уведомлений сохранение 400 //Установка уведомлений сохранение
401 public function save_subscribe(Request $request) { 401 public function save_subscribe(Request $request) {
402 dd($request->all()); 402 dd($request->all());
403 $msg = $request->validate([ 403 $msg = $request->validate([
404 'subscribe_email' => 'required|email|min:5|max:255', 404 'subscribe_email' => 'required|email|min:5|max:255',
405 ]); 405 ]);
406 return redirect()->route('employer.subscribe')->with('Вы успешно подписались на рассылку'); 406 return redirect()->route('employer.subscribe')->with('Вы успешно подписались на рассылку');
407 } 407 }
408 408
409 //Сбросить форму с паролем 409 //Сбросить форму с паролем
410 public function password_reset() { 410 public function password_reset() {
411 $email = Auth()->user()->email; 411 $email = Auth()->user()->email;
412 return view('employers.password-reset', compact('email')); 412 return view('employers.password-reset', compact('email'));
413 } 413 }
414 414
415 //Обновление пароля 415 //Обновление пароля
416 public function new_password(Request $request) { 416 public function new_password(Request $request) {
417 $use = Auth()->user(); 417 $use = Auth()->user();
418 $request->validate([ 418 $request->validate([
419 'password' => 'required|string', 419 'password' => 'required|string',
420 'new_password' => 'required|string', 420 'new_password' => 'required|string',
421 'new_password2' => 'required|string' 421 'new_password2' => 'required|string'
422 ]); 422 ]);
423 423
424 if ($request->get('new_password') == $request->get('new_password2')) 424 if ($request->get('new_password') == $request->get('new_password2'))
425 if ($request->get('password') !== $request->get('new_password')) { 425 if ($request->get('password') !== $request->get('new_password')) {
426 $credentials = $request->only('email', 'password'); 426 $credentials = $request->only('email', 'password');
427 if (Auth::attempt($credentials)) { 427 if (Auth::attempt($credentials)) {
428 428
429 if (!is_null($use->email_verified_at)){ 429 if (!is_null($use->email_verified_at)){
430 430
431 $user_data = User_Model::find($use->id); 431 $user_data = User_Model::find($use->id);
432 $user_data->update([ 432 $user_data->update([
433 'password' => Hash::make($request->get('new_password')), 433 'password' => Hash::make($request->get('new_password')),
434 'pubpassword' => base64_encode($request->get('new_password')), 434 'pubpassword' => base64_encode($request->get('new_password')),
435 ]); 435 ]);
436 return redirect() 436 return redirect()
437 ->route('employer.password_reset') 437 ->route('employer.password_reset')
438 ->with('success', 'Поздравляю! Вы обновили свой пароль!'); 438 ->with('success', 'Поздравляю! Вы обновили свой пароль!');
439 } 439 }
440 440
441 return redirect() 441 return redirect()
442 ->route('employer.password_reset') 442 ->route('employer.password_reset')
443 ->withError('Данная учетная запись не было верифицированна!'); 443 ->withError('Данная учетная запись не было верифицированна!');
444 } 444 }
445 } 445 }
446 446
447 return redirect() 447 return redirect()
448 ->route('employer.password_reset') 448 ->route('employer.password_reset')
449 ->withErrors('Не совпадение данных, обновите пароли!'); 449 ->withErrors('Не совпадение данных, обновите пароли!');
450 } 450 }
451 451
452 // Форма Удаление пипла 452 // Форма Удаление пипла
453 public function delete_people() { 453 public function delete_people() {
454 $login = Auth()->user()->email; 454 $login = Auth()->user()->email;
455 return view('employers.delete_people', compact('login')); 455 return view('employers.delete_people', compact('login'));
456 } 456 }
457 457
458 // Удаление аккаунта 458 // Удаление аккаунта
459 public function action_delete_user(Request $request) { 459 public function action_delete_user(Request $request) {
460 $Answer = $request->all(); 460 $Answer = $request->all();
461 $user_id = Auth()->user()->id; 461 $user_id = Auth()->user()->id;
462 $request->validate([ 462 $request->validate([
463 'password' => 'required|string', 463 'password' => 'required|string',
464 ]); 464 ]);
465 465
466 $credentials = $request->only('email', 'password'); 466 $credentials = $request->only('email', 'password');
467 if (Auth::attempt($credentials)) { 467 if (Auth::attempt($credentials)) {
468 Auth::logout(); 468 Auth::logout();
469 $it = User_Model::find($user_id); 469 $it = User_Model::find($user_id);
470 //$it->delete(); 470 //$it->delete();
471 return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт'); 471 return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт');
472 } else { 472 } else {
473 return redirect()->route('employer.delete_people') 473 return redirect()->route('employer.delete_people')
474 ->withErrors( 'Неверный пароль! Нужен корректный пароль'); 474 ->withErrors( 'Неверный пароль! Нужен корректный пароль');
475 } 475 }
476 } 476 }
477 477
478 // FAQ - Вопросы/ответы для работодателей и соискателей 478 // FAQ - Вопросы/ответы для работодателей и соискателей
479 public function faq() { 479 public function faq() {
480 return view('employers.faq'); 480 return view('employers.faq');
481 } 481 }
482 482
483 // Рассылка сообщений 483 // Рассылка сообщений
484 public function send_all_messages() { 484 public function send_all_messages() {
485 return view('employers.send_all'); 485 return view('employers.send_all');
486 } 486 }
487 487
488 // Отправка сообщений для информации 488 // Отправка сообщений для информации
489 public function send_all_post(Request $request) { 489 public function send_all_post(Request $request) {
490 $data = $request->all(); 490 $data = $request->all();
491 491
492 $emails = User_Model::query()->where('is_worker', '1')->get(); 492 $emails = User_Model::query()->where('is_worker', '1')->get();
493 493
494 foreach ($emails as $e) { 494 foreach ($emails as $e) {
495 Mail::to($e->email)->send(new SendAllMessages($data)); 495 Mail::to($e->email)->send(new SendAllMessages($data));
496 } 496 }
497 497
498 return redirect()->route('employer.send_all_messages')->with('success', 'Письма были отправлены'); 498 return redirect()->route('employer.send_all_messages')->with('success', 'Письма были отправлены');
499 } 499 }
500 500
501 // База резюме 501 // База резюме
502 public function bd_tupe(Request $request) { 502 public function bd_tupe(Request $request) {
503 $Resume = User_Model::query()->with('workers')->where('is_bd', '=', '1')->get(); 503 $Resume = User_Model::query()->with('workers')->where('is_bd', '=', '1')->get();
504 504
505 return view('employers.bd_tupe', compact('Resume')); 505 return view('employers.bd_tupe', compact('Resume'));
506 } 506 }
507 } 507 }
508 508
app/Http/Controllers/WorkerController.php
1 <?php 1 <?php
2 2
3 namespace App\Http\Controllers; 3 namespace App\Http\Controllers;
4 4
5 use App\Models\Message; 5 use App\Models\Message;
6 use App\Models\Static_worker; 6 use App\Models\Static_worker;
7 use App\Models\User;
7 use App\Models\Worker; 8 use App\Models\Worker;
9 use Illuminate\Auth\Events\Registered;
10 use Illuminate\Http\JsonResponse;
8 use Illuminate\Http\Request; 11 use Illuminate\Http\Request;
12 use Illuminate\Support\Facades\Auth;
13 use Illuminate\Support\Facades\Hash;
14 use Illuminate\Support\Facades\Validator;
9 15
10 class WorkerController extends Controller 16 class WorkerController extends Controller
11 { 17 {
12 public $status_work = Array(0 => 'Ищу работу', 1=> 'Не указано', 2=>'Не ищу работу'); 18 public $status_work = array(0 => 'Ищу работу', 1 => 'Не указано', 2 => 'Не ищу работу');
19
13 //профиль 20 //профиль
14 public function profile(Worker $worker) { 21 public function profile(Worker $worker)
22 {
15 $get_date = date('Y.m'); 23 $get_date = date('Y.m');
16 24
17 $c = Static_worker::query()->where('year_month', '=', $get_date) 25 $c = Static_worker::query()->where('year_month', '=', $get_date)
18 ->where('user_id', '=', $worker->users->id) 26 ->where('user_id', '=', $worker->users->id)
19 ->get(); 27 ->get();
20 28
21 if ($c->count() > 0) { 29 if ($c->count() > 0) {
22 $upd = Static_worker::find($c[0]->id); 30 $upd = Static_worker::find($c[0]->id);
23 $upd->lookin = $upd->lookin + 1; 31 $upd->lookin = $upd->lookin + 1;
24 $upd->save(); 32 $upd->save();
25 } else { 33 } else {
26 $crt = new Static_worker(); 34 $crt = new Static_worker();
27 $crt->lookin = 1; 35 $crt->lookin = 1;
28 $crt->year_month = $get_date; 36 $crt->year_month = $get_date;
29 $crt->user_id = $worker->user_id; 37 $crt->user_id = $worker->user_id;
30 $crt->save(); 38 $crt->save();
31 } 39 }
32 40
33 $stat = Static_worker::query()->where('year_month', '=', $get_date) 41 $stat = Static_worker::query()->where('year_month', '=', $get_date)
34 ->where('user_id', '=', $worker->users->id) 42 ->where('user_id', '=', $worker->users->id)
35 ->get(); 43 ->get();
36 44
37 return view('public.workers.profile', compact('worker', 'stat')); 45 return view('public.workers.profile', compact('worker', 'stat'));
38 } 46 }
39 47
40 // лист база резюме 48 // лист база резюме
41 public function bd_resume() { 49 public function bd_resume()
50 {
42 $status_work = $this->status_work; 51 $status_work = $this->status_work;
43 $resumes = Worker::query()->with('users')->with('job_titles'); 52 $resumes = Worker::query()->with('users')->with('job_titles');
44 53
45 $res_count = $resumes->count(); 54 $res_count = $resumes->count();
46 $resumes = $resumes->paginate(5); 55 $resumes = $resumes->paginate(5);
47 56
48 return view('resume', compact('resumes', 'status_work', 'res_count')); 57 return view('resume', compact('resumes', 'status_work', 'res_count'));
49 } 58 }
50 59
51 // анкета соискателя 60 // анкета соискателя
52 public function resume_profile(Worker $worker) { 61 public function resume_profile(Worker $worker)
62 {
53 $status_work = $this->status_work; 63 $status_work = $this->status_work;
54 $Query = Worker::query()->with('users')->with('job_titles') 64 $Query = Worker::query()->with('users')->with('job_titles')
55 ->with('place_worker')->with('sertificate')->with('prev_company') 65 ->with('place_worker')->with('sertificate')->with('prev_company')
56 ->with('infobloks'); 66 ->with('infobloks');
57 $Query = $Query->where('id', '=', $worker->id); 67 $Query = $Query->where('id', '=', $worker->id);
58 $Query = $Query->get(); 68 $Query = $Query->get();
59 return view('worker', compact('Query', 'status_work')); 69 return view('worker', compact('Query', 'status_work'));
60 } 70 }
61 71
62 // скачать анкету соискателя 72 // скачать анкету соискателя
63 public function resume_download(Worker $worker) { 73 public function resume_download(Worker $worker)
74 {
64 print_r('Резюме для скачивания'); 75 print_r('Резюме для скачивания');
65 } 76 }
66 77
67 // Кабинет работника 78 // Кабинет работника
68 public function cabinet(Worker $worker) { 79 public function cabinet(Worker $worker)
80 {
69 return view('workers.cabinet', compact('worker')); 81 return view('workers.cabinet', compact('worker'));
70 } 82 }
71 83
72 // Сохранение данных 84 // Сохранение данных
73 public function cabinet_save(Worker $worker, Request $request) { 85 public function cabinet_save(Worker $worker, Request $request)
86 {
74 87
75 } 88 }
76 89
77 // Сообщения данные 90 // Сообщения данные
78 public function messages($type_message) { 91 public function messages($type_message)
92 {
79 $user_id = Auth()->user()->id; 93 $user_id = Auth()->user()->id;
80 94
81 $messages_input = Message::query()->with('vacancies')->with('user_from')-> 95 $messages_input = Message::query()->with('vacancies')->with('user_from')->
82 Where('to_user_id', $user_id)->OrderByDesc('created_at'); 96 Where('to_user_id', $user_id)->OrderByDesc('created_at');
83 97
84 $messages_output = Message::query()->with('vacancies')-> 98 $messages_output = Message::query()->with('vacancies')->
85 with('user_to')->where('user_id', $user_id)-> 99 with('user_to')->where('user_id', $user_id)->
86 OrderByDesc('created_at'); 100 OrderByDesc('created_at');
87 101
88 102
89 $count_input = $messages_input->count(); 103 $count_input = $messages_input->count();
90 $count_output = $messages_output->count(); 104 $count_output = $messages_output->count();
91 105
92 if ($type_message == 'input') { 106 if ($type_message == 'input') {
93 $messages = $messages_input->paginate(15); 107 $messages = $messages_input->paginate(15);
94 } 108 }
95 109
96 if ($type_message == 'output') { 110 if ($type_message == 'output') {
97 $messages = $messages_output->paginate(15); 111 $messages = $messages_output->paginate(15);
98 } 112 }
99 // Вернуть все 100% 113 // Вернуть все 100%
100 return view('workers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id')); 114 return view('workers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id'));
101 } 115 }
102 116
103 // Избранный 117 // Избранный
104 public function favorite() { 118 public function favorite()
119 {
105 120
106 return view('workers.favorite'); 121 return view('workers.favorite');
107 } 122 }
108 123
109 124
110 // Сменить пароль 125 // Сменить пароль
111 public function new_password() { 126 public function new_password()
127 {
112 return view('workers.new_password'); 128 return view('workers.new_password');
113 } 129 }
114 130
115 // Удаление профиля 131 // Удаление профиля
116 public function delete_profile() { 132 public function delete_profile()
133 {
117 134
118 return view('workers.delete_profile'); 135 return view('workers.delete_profile');
119 } 136 }
137
138 // Регистрация соискателя
139 public function register_worker(Request $request)
140 {
141 $params = $request->all();
142
143 $rules = [
144 'surname' => ['required', 'string', 'max:255'],
145 'name_man' => ['required', 'string', 'max:255'],
146 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
147 'password' => ['required', 'string', 'min:8'],
148 'confirmed' => ['required', 'string', 'min:8'],
149 ];
150
151 $messages = [
152 'required' => 'Укажите обязательное поле',
153 'min' => [
154 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
155 'integer' => 'Поле «:attribute» должно быть :min или больше',
156 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
157 ],
158 'max' => [
159 'string' => 'Поле «:attribute» должно быть не больше :max символов',
160 'integer' => 'Поле «:attribute» должно быть :max или меньше',
161 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
162 ]
163 ];
164
165
166
167 if ($request->get('password') !== $request->get('confirmed')){
168 return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля"));
169 }
170
171 $validator = Validator::make($request->all(), $rules, $messages);
172
173 if ($validator->fails()) {
174 return json_encode(Array("ERROR" => "Error: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены"));
175 } else {
176 $user = $this->create($params);
177 event(new Registered($user));
178
179 Auth::guard()->login($user);
180 }
181 if ($user) {
182 return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl()));;
183 } else {
184 return json_encode(Array("ERROR" => "Данные были утеряны!"));
185 }
186 }
187
188 // Создание пользователя
189 protected function create(array $data)
190 {
191 $Use = new User();
192 $Code_user = $Use->create([
193 'name' => $data['surname']." ".$data['name_man'],
194 'subscribe_email' => $data['email'],
195 'email' => $data['email'],
196 'telephone' => $data['telephone'],
197 'password' => Hash::make($data['password']),
198 'pubpassword' => base64_encode($data['password']),
199 ]);
200 dd($Code_user);
201 }
120 } 202 }
203
121 204
app/Providers/MyServiceProvider.php
1 <?php 1 <?php
2 2
3 namespace App\Providers; 3 namespace App\Providers;
4 4
5 use App\Models\Company; 5 use App\Models\Company;
6 use App\Models\ContentRoles; 6 use App\Models\ContentRoles;
7 use App\Models\Employer; 7 use App\Models\Employer;
8 use App\Models\Job_title; 8 use App\Models\Job_title;
9 use App\Models\Worker; 9 use App\Models\Worker;
10 use Illuminate\Support\Facades\Auth; 10 use Illuminate\Support\Facades\Auth;
11 use Illuminate\Support\Facades\DB; 11 use Illuminate\Support\Facades\DB;
12 use Illuminate\Support\Facades\View; 12 use Illuminate\Support\Facades\View;
13 use Illuminate\Support\ServiceProvider; 13 use Illuminate\Support\ServiceProvider;
14 14
15 class MyServiceProvider extends ServiceProvider 15 class MyServiceProvider extends ServiceProvider
16 { 16 {
17 /** 17 /**
18 * Register services. 18 * Register services.
19 * 19 *
20 * @return void 20 * @return void
21 */ 21 */
22 public function register() 22 public function register()
23 { 23 {
24 // 24 //
25 } 25 }
26 26
27 /** 27 /**
28 * Bootstrap services. 28 * Bootstrap services.
29 * 29 *
30 * @return void 30 * @return void
31 */ 31 */
32 public function boot() 32 public function boot()
33 { 33 {
34 $views = ['admin.job_titles.parent_id']; 34 $views = ['admin.job_titles.parent_id'];
35 View::composer($views, 35 View::composer($views,
36 function($view) 36 function($view)
37 { 37 {
38 static $items = null; 38 static $items = null;
39 39
40 if (is_null($items)) { 40 if (is_null($items)) {
41 $items = Job_title::query()-> 41 $items = Job_title::query()->
42 orderByDesc('sort')-> 42 orderByDesc('sort')->
43 orderBy('name')-> 43 orderBy('name')->
44 active()-> 44 active()->
45 get(); 45 get();
46 $parent = 0; 46 $parent = 0;
47 $view->with(['items' => $items, 'parent' => $parent]); 47 $view->with(['items' => $items, 'parent' => $parent]);
48 } else { 48 } else {
49 $view->with(['items' => $items]); 49 $view->with(['items' => $items]);
50 } 50 }
51 51
52 } 52 }
53 ); 53 );
54 54
55 $views2 = ['layout.admin', 'admin.index']; 55 $views2 = ['layout.admin', 'admin.index'];
56 56
57 View::composer($views2, 57 View::composer($views2,
58 function($view){ 58 function($view){
59 $id = Auth::user()->id; 59 $id = Auth::user()->id;
60 $is_manager = Auth::user()->is_manager; 60 $is_manager = Auth::user()->is_manager;
61 $admin = Auth::user()->admin; 61 $admin = Auth::user()->admin;
62 62
63 $contents = ContentRoles::query()->get(); 63 $contents = ContentRoles::query()->get();
64 64
65 $query = DB::select(DB::raw('SELECT count(*) as MsgCount 65 $query = DB::select(DB::raw('SELECT count(*) as MsgCount
66 FROM messages m1 66 FROM messages m1
67 Where ((m1.flag_new = 1) and (m1.to_user_id = :uid)) 67 Where ((m1.flag_new = 1) and (m1.to_user_id = :uid))
68 '), ['uid' => $id] 68 '), ['uid' => $id]
69 ); 69 );
70 70
71 $view->with(['MsgCount' => $query[0]->MsgCount, 71 $view->with(['MsgCount' => $query[0]->MsgCount,
72 'UserId' => $id, 72 'UserId' => $id,
73 'is_manager' => $is_manager, 73 'is_manager' => $is_manager,
74 'admin' => $admin, 74 'admin' => $admin,
75 'contents' => $contents]); 75 'contents' => $contents]);
76 } 76 }
77 ); 77 );
78 78
79 $views3 = ['layout.frontend']; 79 $views3 = ['layout.frontend'];
80 80
81 View::composer($views3, 81 View::composer($views3,
82 function($view){ 82 function($view){
83 $id = Auth::user(); 83 $id = Auth::user();
84 $companies = Company::query()->limit(1)->get(); 84 $companies = Company::query()->limit(1)->get();
85 85
86 $view->with(['UserId' => $id, 'companies' => $companies]); 86 $view->with(['UserId' => $id, 'companies' => $companies]);
87 } 87 }
88 ); 88 );
89 89
90 $view1 = ['employers.menu', 'employers.emblema', 'employers.send_all']; 90 $view1 = ['employers.menu', 'employers.emblema', 'employers.send_all'];
91 View::composer($view1, 91 View::composer($view1,
92 function($view){ 92 function($view){
93 $user = Auth::user(); 93 $user = Auth::user();
94 $id = $user->id; 94 $id = $user->id;
95 $employer = Employer::query()->where('user_id', $id)->get(); 95 $employer = Employer::query()->where('user_id', $id)->get();
96 $id_employer = $employer[0]->id; 96 $id_employer = $employer[0]->id;
97 $view->with(['id_employer' => $id_employer, 'Employer' => $employer]); 97 $view->with(['id_employer' => $id_employer, 'Employer' => $employer]);
98 } 98 }
99 ); 99 );
100 100
101 $view_worker = ['workers.emblema']; 101 $view_worker = ['workers.emblema'];
102 View::composer($view_worker, 102 View::composer($view_worker,
103 function($view_worker) { 103 function($view_worker) {
104 $user = Auth::user(); 104 $user = Auth::user();
105 $id = $user->id; 105 $id = $user->id;
106 $Worker = Worker::query()->where('user_id', $id)->get(); 106 $Worker = Worker::query()->where('user_id', $id)->get();
107 $id_worker = $Worker[0]->id; 107 $id_worker = $Worker[0]->id;
108 $view_worker->with(['id_worker' => $id_worker, 'Worker' => $Worker, 'User' => $user]); 108 $view_worker->with(['id_worker' => $id_worker, 'Worker' => $Worker, 'User' => $user]);
109 } 109 }
110 ); 110 );
111
112 $view_job_title = ['modals.register'];
113 View::composer($view_job_title,
114 function($view_job_title) {
115 $Job_titles = Job_title::query()->get();
116 $view_job_title->with(['Job_titles' => $Job_titles]);
117 }
118 );
119
111 } 120 }
112 } 121 }
113 122
resources/views/index.blade.php
1 @extends('layout.frontend', ['title' => 'Главная страница РекаМоре']) 1 @extends('layout.frontend', ['title' => 'Главная страница РекаМоре'])
2 2
3 @section('scripts') 3 @section('scripts')
4 <script> 4 <script>
5 console.log('Test system'); 5 console.log('Test system');
6 $(document).on('click', '#button_send', function() { 6 $(document).on('click', '#button_send', function() {
7 var field_login = $('#email'); 7 var field_login = $('#email');
8 var field_pwd = $('#password'); 8 var field_pwd = $('#password');
9 var login_val = field_login.val(); 9 var login_val = field_login.val();
10 var pwd_val = field_pwd.val(); 10 var pwd_val = field_pwd.val();
11 11
12 console.log('login: '+login_val+' password: '+pwd_val); 12 console.log('login: '+login_val+' password: '+pwd_val);
13 13
14 $.ajax({ 14 $.ajax({
15 type: "GET", 15 type: "GET",
16 url: "{{ route('login') }}", 16 url: "{{ route('login') }}",
17 data: "email="+login_val+"&password="+pwd_val, 17 data: "email="+login_val+"&password="+pwd_val,
18 success: function (data) { 18 success: function (data) {
19 console.log('Вход в систему'); 19 console.log('Вход в систему');
20 let d = JSON.parse(data); 20 let d = JSON.parse(data);
21 if(typeof d['REDIRECT'] !== "undefined") { 21 if(typeof d['REDIRECT'] !== "undefined") {
22 location.href = d['REDIRECT']; 22 location.href = d['REDIRECT'];
23 } 23 }
24 if (typeof d['ERROR'] !== "undefined") { 24 if (typeof d['ERROR'] !== "undefined") {
25 $('#message_error').html(d['ERROR']); 25 $('#message_error').html(d['ERROR']);
26 } 26 }
27 console.log(d['REDIRECT']); 27 console.log(d['REDIRECT']);
28 //$('#block_1').html(data); 28 //$('#block_1').html(data);
29 }, 29 },
30 headers: { 30 headers: {
31 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 31 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
32 }, 32 },
33 error: function (data) { 33 error: function (data) {
34 data = JSON.stringify(data); 34 data = JSON.stringify(data);
35 console.log('Error: ' + data); 35 console.log('Error: ' + data);
36 } 36 }
37 }); 37 });
38 }); 38 });
39
40 $(document).on('click', '#button_reg_worker', function() {
41 var field_login = $('#email_worker');
42 var field_pwd = $('#password_worker');
43 var field_confirm_pwd = $('#password_confirmation_worker');
44 var field_politik_worker = $('#politik_worker');
45 var field_telephone_worker = $('#telephone_worker');
46 var field_job_titles_worker = $('#job_titles_worker');
47 var field_surname_worker = $('#surname_worker');
48 var field_name_man = $('#name_man_worker');
49 var field_surname2_worker = $('#surname2_worker');
50
51 var login = field_login.val();
52 var pwd = field_pwd.val();
53 var confirm_pwd = field_confirm_pwd.val();
54 var politik = field_politik_worker.val();
55 var telephone = field_telephone_worker.val();
56 var job_titles = field_job_titles_worker.val();
57 var surname = field_surname_worker.val();
58 var name_man = field_name_man.val();
59 var surname2 = field_surname2_worker.val();
60
61
62 console.log('login: '+login+' password: '+pwd);
63
64 $.ajax({
65 type: "GET",
66 url: "{{ route('register_worker') }}",
67 data: "email="+login+"&password="+pwd+"&confirmed="+confirm_pwd+"&politik="+politik+
68 "&telephone="+telephone+"&job_titles="+job_titles+"&surname="+surname+"&name_man="+name_man+
69 "&surname2="+surname2+"&subscribe_email="+login,
70 success: function (data) {
71 console.log('Вход в систему');
72 let d = JSON.parse(data);
73 if(typeof d['REDIRECT'] !== "undefined") {
74 console.log(d['REDIRECT']);
75 //location.href = d['REDIRECT'];
76 }
77 if (typeof d['ERROR'] !== "undefined") {
78 console.log(d['ERROR']);
79 //$('#message_error').html(d['ERROR']);
80 }
81 console.log(d['REDIRECT']);
82 //$('#block_1').html(data);
83 },
84 headers: {
85 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
86 },
87 error: function (data) {
88 data = JSON.stringify(data);
89 console.log('Error: ' + data);
90 }
91 });
92
93 return false;
94 });
39 </script> 95 </script>
40 @endsection 96 @endsection
41 97
42 @section('content') 98 @section('content')
43 <section class="work"> 99 <section class="work">
44 <div class="container"> 100 <div class="container">
45 <img src="{{ asset('images/1.png') }}" alt="" class="work__pic"> 101 <img src="{{ asset('images/1.png') }}" alt="" class="work__pic">
46 <div class="work__body"> 102 <div class="work__body">
47 <div class="work__title"> 103 <div class="work__title">
48 Работа в море / 104 Работа в море /
49 <span class="br">Работа на реке</span> 105 <span class="br">Работа на реке</span>
50 </div> 106 </div>
51 <div class="work__text">Профессиональная сеть морского сообщества «RekaMore.su» приветствует вас — 107 <div class="work__text">Профессиональная сеть морского сообщества «RekaMore.su» приветствует вас —
52 тех, кто не представляет себе жизнь без моря, тех, кто готов связать свою жизнь с работой в 108 тех, кто не представляет себе жизнь без моря, тех, кто готов связать свою жизнь с работой в
53 сложных, но очень интересных условиях. </div> 109 сложных, но очень интересных условиях. </div>
54 <div class="work__list"> 110 <div class="work__list">
55 <div>Тысячи соискателей увидят Ваше объявление</div> 111 <div>Тысячи соискателей увидят Ваше объявление</div>
56 <div>Десятки компаний выкладывают объявления каждый день</div> 112 <div>Десятки компаний выкладывают объявления каждый день</div>
57 </div> 113 </div>
58 <form class="search work__form" action="{{ route('search_vacancies') }}" method="GET"> 114 <form class="search work__form" action="{{ route('search_vacancies') }}" method="GET">
59 <input type="search" id="search" name="search" class="input" placeholder="Желаемая должность" required> 115 <input type="search" id="search" name="search" class="input" placeholder="Желаемая должность" required>
60 <button type="submit" class="button button_light">Посмотреть вакансии</button> 116 <button type="submit" class="button button_light">Посмотреть вакансии</button>
61 <span> 117 <span>
62 <svg> 118 <svg>
63 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> 119 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use>
64 </svg> 120 </svg>
65 </span> 121 </span>
66 </form> 122 </form>
67 <a href="{{ route('bd_resume') }}" class="button work__search">Я ищу сотрудника</a> 123 <a href="{{ route('bd_resume') }}" class="button work__search">Я ищу сотрудника</a>
68 <div class="work__get"> 124 <div class="work__get">
69 <b>Скачать приложение</b> 125 <b>Скачать приложение</b>
70 <a href=""> 126 <a href="">
71 <img src="{{ asset('images/google.svg') }}" alt=""> 127 <img src="{{ asset('images/google.svg') }}" alt="">
72 </a> 128 </a>
73 <a href=""> 129 <a href="">
74 <img src="{{ asset('images/apple.svg') }}" alt=""> 130 <img src="{{ asset('images/apple.svg') }}" alt="">
75 </a> 131 </a>
76 </div> 132 </div>
77 </div> 133 </div>
78 </div> 134 </div>
79 </section> 135 </section>
80 <section class="numbers"> 136 <section class="numbers">
81 <div class="container"> 137 <div class="container">
82 <div class="numbers__body"> 138 <div class="numbers__body">
83 <div class="numbers__item"> 139 <div class="numbers__item">
84 <b>500+</b> 140 <b>500+</b>
85 <span>Резюме</span> 141 <span>Резюме</span>
86 Банальные, но неопровержимые выводы, а также элементы политического процесса лишь добавляют 142 Банальные, но неопровержимые выводы, а также элементы политического процесса лишь добавляют
87 фракционных разногласий и призваны к ответу. 143 фракционных разногласий и призваны к ответу.
88 </div> 144 </div>
89 <div class="numbers__item"> 145 <div class="numbers__item">
90 <b>1 000+</b> 146 <b>1 000+</b>
91 <span>Вакансий</span> 147 <span>Вакансий</span>
92 В рамках спецификации современных стандартов, диаграммы связей заблокированы в рамках своих 148 В рамках спецификации современных стандартов, диаграммы связей заблокированы в рамках своих
93 собственных рациональных ограничений. 149 собственных рациональных ограничений.
94 </div> 150 </div>
95 <div class="numbers__item"> 151 <div class="numbers__item">
96 <b>265</b> 152 <b>265</b>
97 <span>Компаний</span> 153 <span>Компаний</span>
98 Но сторонники тоталитаризма в науке заблокированы в рамках своих собственных рациональных 154 Но сторонники тоталитаризма в науке заблокированы в рамках своих собственных рациональных
99 ограничений. 155 ограничений.
100 </div> 156 </div>
101 </div> 157 </div>
102 </div> 158 </div>
103 </section> 159 </section>
104 <section class="vacancies"> 160 <section class="vacancies">
105 <div class="container"> 161 <div class="container">
106 <div class="title">Новые вакансии</div> 162 <div class="title">Новые вакансии</div>
107 <div class="vacancies__body"> 163 <div class="vacancies__body">
108 <a class="vacancies__more button button_light js-parent-toggle" href="{{ route('vacancies') }}">Все должности</a> 164 <a class="vacancies__more button button_light js-parent-toggle" href="{{ route('vacancies') }}">Все должности</a>
109 <div class="vacancies__list"> 165 <div class="vacancies__list">
110 @if ($categories->count()) 166 @if ($categories->count())
111 @foreach ($categories as $cat) 167 @foreach ($categories as $cat)
112 <a href="#" class="vacancies__item"> 168 <a href="#" class="vacancies__item">
113 <span style="border-color:#F4C4C2"> 169 <span style="border-color:#F4C4C2">
114 <b>{{ $cat->name }}</b> 170 <b>{{ $cat->name }}</b>
115 <i>Вакансий: <span>{{ $cat->cnt }}</span></i> 171 <i>Вакансий: <span>{{ $cat->cnt }}</span></i>
116 </span> 172 </span>
117 </a> 173 </a>
118 @endforeach 174 @endforeach
119 @else 175 @else
120 Тут пока нет никаких вакансий 176 Тут пока нет никаких вакансий
121 @endif 177 @endif
122 </div> 178 </div>
123 </div> 179 </div>
124 </div> 180 </div>
125 </section> 181 </section>
126 <section class="employer"> 182 <section class="employer">
127 <div class="container"> 183 <div class="container">
128 <div class="title">Работодатели</div> 184 <div class="title">Работодатели</div>
129 <div class="swiper js-employer-swiper"> 185 <div class="swiper js-employer-swiper">
130 <div class="swiper-wrapper"> 186 <div class="swiper-wrapper">
131 187
132 @if ($employers->count()) 188 @if ($employers->count())
133 @php 189 @php
134 $rec = 0; 190 $rec = 0;
135 $count = $employers->count(); 191 $count = $employers->count();
136 @endphp 192 @endphp
137 @foreach($employers as $emp) 193 @foreach($employers as $emp)
138 @php $rec++ @endphp 194 @php $rec++ @endphp
139 @if (($rec==1) || ($rec==5) || ($rec==9) || ($rec==13) || ($rec==17)) 195 @if (($rec==1) || ($rec==5) || ($rec==9) || ($rec==13) || ($rec==17))
140 <div class="swiper-slide"> 196 <div class="swiper-slide">
141 <div class="employer__item"> 197 <div class="employer__item">
142 @endif 198 @endif
143 @if (!empty($emp->logo)) 199 @if (!empty($emp->logo))
144 <a href="{{ route('ad-employer', ['ad_employer' => $emp->id]) }}"> 200 <a href="{{ route('ad-employer', ['ad_employer' => $emp->id]) }}">
145 <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}"> 201 <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}">
146 </a> 202 </a>
147 @else 203 @else
148 <a href="{{ route('ad-employer', ['ad_employer' => $emp->id]) }}"> 204 <a href="{{ route('ad-employer', ['ad_employer' => $emp->id]) }}">
149 <img src="{{ asset('images/logo_emp.png') }}" alt="{{ $emp->name_company }}"> 205 <img src="{{ asset('images/logo_emp.png') }}" alt="{{ $emp->name_company }}">
150 </a> 206 </a>
151 @endif 207 @endif
152 @if (($rec==4) || ($rec==8) || ($rec==12) || ($rec==16) || ($rec==20) || ($rec == $count)) 208 @if (($rec==4) || ($rec==8) || ($rec==12) || ($rec==16) || ($rec==20) || ($rec == $count))
153 </div> 209 </div>
154 </div> 210 </div>
155 @endif 211 @endif
156 @endforeach 212 @endforeach
157 @else 213 @else
158 <h5>Тут нет никаких записей</h5> 214 <h5>Тут нет никаких записей</h5>
159 @endif 215 @endif
160 </div> 216 </div>
161 <div class="swiper-pagination"></div> 217 <div class="swiper-pagination"></div>
162 </div> 218 </div>
163 <a href="{{ route('shipping_companies') }}" class="employer__more button button_light">Все работодатели</a> 219 <a href="{{ route('shipping_companies') }}" class="employer__more button button_light">Все работодатели</a>
164 </div> 220 </div>
165 </section> 221 </section>
166 <section class="about"> 222 <section class="about">
167 <div class="container"> 223 <div class="container">
168 <div class="about__wrapper"> 224 <div class="about__wrapper">
169 <div class="title about__title">О нас</div> 225 <div class="title about__title">О нас</div>
170 <div class="about__body"> 226 <div class="about__body">
171 <div class="about__line"></div> 227 <div class="about__line"></div>
172 <div class="about__item"> 228 <div class="about__item">
173 <b>Для работодателей</b> 229 <b>Для работодателей</b>
174 <span>Наш ресурс позволит Вам за демократичную цену найти нужных специалистов в кратчайшие 230 <span>Наш ресурс позволит Вам за демократичную цену найти нужных специалистов в кратчайшие
175 сроки, подробнее об условиях можно узнать <a href="{{ route('page', ['pages' => 'Stoimost-razmescheniya']) }}">здесь</a>.</span> 231 сроки, подробнее об условиях можно узнать <a href="{{ route('page', ['pages' => 'Stoimost-razmescheniya']) }}">здесь</a>.</span>
176 <a class="about__button button button_whited" href="{{ route('bd_resume') }}">Поиск сотрудников</a> 232 <a class="about__button button button_whited" href="{{ route('bd_resume') }}">Поиск сотрудников</a>
177 </div> 233 </div>
178 <div class="about__item"> 234 <div class="about__item">
179 <b>Для сотрудников</b> 235 <b>Для сотрудников</b>
180 <span>Наше преимущество — это большой объем вакансий, более 70 судоходных компаний России и 236 <span>Наше преимущество — это большой объем вакансий, более 70 судоходных компаний России и
181 СНГ ищут сотрудников через наши ресурсы</span> 237 СНГ ищут сотрудников через наши ресурсы</span>
182 <a class="about__button button button_whited" href="{{ route('vacancies') }}">Посмотреть вакансии</a> 238 <a class="about__button button button_whited" href="{{ route('vacancies') }}">Посмотреть вакансии</a>
183 </div> 239 </div>
184 </div> 240 </div>
185 </div> 241 </div>
186 </div> 242 </div>
187 </section> 243 </section>
188 <section class="news"> 244 <section class="news">
189 <div class="container"> 245 <div class="container">
190 <div class="news__toper"> 246 <div class="news__toper">
191 <div class="title">Новости и статьи</div> 247 <div class="title">Новости и статьи</div>
192 <div class="navs"> 248 <div class="navs">
193 <button class="js-news-swiper-button-prev"> 249 <button class="js-news-swiper-button-prev">
194 <svg class="rotate180"> 250 <svg class="rotate180">
195 <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use> 251 <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use>
196 </svg> 252 </svg>
197 </button> 253 </button>
198 <button class="js-news-swiper-button-next"> 254 <button class="js-news-swiper-button-next">
199 <svg> 255 <svg>
200 <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use> 256 <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use>
201 </svg> 257 </svg>
202 </button> 258 </button>
203 </div> 259 </div>
204 </div> 260 </div>
205 <div class="swiper js-news-swiper"> 261 <div class="swiper js-news-swiper">
206 <div class="swiper-wrapper"> 262 <div class="swiper-wrapper">
207 @if ($news->count()) 263 @if ($news->count())
208 @foreach ($news as $new) 264 @foreach ($news as $new)
209 <div class="swiper-slide"> 265 <div class="swiper-slide">
210 <div class="news__item"> 266 <div class="news__item">
211 <img src="{{ asset(Storage::url($new->image)) }}" alt="" class="news__item-pic"> 267 <img src="{{ asset(Storage::url($new->image)) }}" alt="" class="news__item-pic">
212 <div class="news__item-body"> 268 <div class="news__item-body">
213 <time datetime="2023-05-01" class="news__item-date">{{ $new->created_at }}</time> 269 <time datetime="2023-05-01" class="news__item-date">{{ $new->created_at }}</time>
214 <span class="news__item-title">{{ $new->title }}</span> 270 <span class="news__item-title">{{ $new->title }}</span>
215 <span class="news__item-text">{{ mb_strimwidth($new->text, 0, 100) }}</span> 271 <span class="news__item-text">{{ mb_strimwidth($new->text, 0, 100) }}</span>
216 <a href="#" class="news__item-more button button_light">Читать далее</a> 272 <a href="#" class="news__item-more button button_light">Читать далее</a>
217 </div> 273 </div>
218 </div> 274 </div>
219 </div> 275 </div>
220 @endforeach 276 @endforeach
221 @endif 277 @endif
222 </div> 278 </div>
223 <div class="swiper-pagination"></div> 279 <div class="swiper-pagination"></div>
224 </div> 280 </div>
225 <div class="news__all button button_light">Все новости</div> 281 <div class="news__all button button_light">Все новости</div>
226 </div> 282 </div>
227 </section> 283 </section>
228 <section class="info"> 284 <section class="info">
229 <div class="container"> 285 <div class="container">
230 <img src="images/5.png" alt="" class="info__pic"> 286 <img src="images/5.png" alt="" class="info__pic">
231 <div class="info__body"> 287 <div class="info__body">
232 <div class="title info__title">Мы в социальных сетях</div> 288 <div class="title info__title">Мы в социальных сетях</div>
233 <div class="info__item"> 289 <div class="info__item">
234 <div class="info__text">Телеграм — Подпишитесь на наш телеграм канал и получайте уведомления о 290 <div class="info__text">Телеграм — Подпишитесь на наш телеграм канал и получайте уведомления о
235 новых вакансиях прямо на свой смартфон</div> 291 новых вакансиях прямо на свой смартфон</div>
236 <a href="#" class="info__link" style="background:#20A0E1"> 292 <a href="#" class="info__link" style="background:#20A0E1">
237 <svg> 293 <svg>
238 <use xlink:href="images/sprite.svg#tg"></use> 294 <use xlink:href="images/sprite.svg#tg"></use>
239 </svg> 295 </svg>
240 Телеграм 296 Телеграм
241 </a> 297 </a>
242 </div> 298 </div>
243 <div class="info__item"> 299 <div class="info__item">
244 <div class="info__text">ВКонтакте — Лучшие вакансии за неделю выкладываем именно тут, информация 300 <div class="info__text">ВКонтакте — Лучшие вакансии за неделю выкладываем именно тут, информация
245 о судоходных компаниях, инструкции по работе с сайтом, конкурсы и многое другое</div> 301 о судоходных компаниях, инструкции по работе с сайтом, конкурсы и многое другое</div>
246 <a href="#" class="info__link" style="background:#2787F5"> 302 <a href="#" class="info__link" style="background:#2787F5">
247 <svg> 303 <svg>
248 <use xlink:href="images/sprite.svg#vk"></use> 304 <use xlink:href="images/sprite.svg#vk"></use>
249 </svg> 305 </svg>
250 ВКонтакте 306 ВКонтакте
251 </a> 307 </a>
252 </div> 308 </div>
253 </div> 309 </div>
254 </div> 310 </div>
255 </section> 311 </section>
256 @endsection 312 @endsection
257 313
resources/views/modals/register.blade.php
1 <div id="reg" class="modal"> 1 <div id="reg" class="modal">
2 <div class="modal__body"> 2 <div class="modal__body">
3 <div class="modal__title left">Регистрация</div> 3 <div class="modal__title left">Регистрация</div>
4 <div class="modal__tabs"> 4 <div class="modal__tabs">
5 <button type="button" class="modal__tabs-item button button_light active" data-tab="1">Кандидат</button> 5 <button type="button" class="modal__tabs-item button button_light active" data-tab="1">Кандидат</button>
6 <button type="button" class="modal__tabs-item button button_light" data-tab="2">Работодатель</button> 6 <button type="button" class="modal__tabs-item button button_light" data-tab="2">Работодатель</button>
7 </div> 7 </div>
8 <form class="modal__reg showed" data-body="1"> 8 <form class="modal__reg showed" data-body="1">
9 <div class="modal__reg-item form-group"> 9 <div class="modal__reg-item form-group">
10 <label class="form-group__label">Электронная почта</label> 10 <label class="form-group__label">Электронная почта</label>
11 <div class="form-group__item"> 11 <div class="form-group__item">
12 <input type="email" class="input" placeholder="info@rekamore.su" required> 12 <input type="email" id="email_worker" name="email_worker" class="input" placeholder="info@rekamore.su" required>
13 </div> 13 </div>
14 </div> 14 </div>
15
15 <div class="modal__reg-item form-group"> 16 <div class="modal__reg-item form-group">
16 <label class="form-group__label">Пароль</label> 17 <label class="form-group__label">Пароль</label>
17 <div class="form-group__item"> 18 <div class="form-group__item">
18 <input type="password" class="input" placeholder="**********" required> 19 <input type="password" id="password_worker" name="password_worker" class="input" placeholder="**********" required>
19 <button type="button" class="eye"> 20 <button type="button" class="eye">
20 <svg class="js-password-show"> 21 <svg class="js-password-show">
21 <use xlink:href="images/sprite.svg#eye"></use> 22 <use xlink:href="{{ asset('images/sprite.svg#eye') }}"></use>
22 </svg> 23 </svg>
23 <svg class="js-password-hide"> 24 <svg class="js-password-hide">
24 <use xlink:href="images/sprite.svg#eye-2"></use> 25 <use xlink:href="{{ asset('images/sprite.svg#eye-2') }}"></use>
25 </svg> 26 </svg>
26 </button> 27 </button>
27 </div> 28 </div>
28 </div> 29 </div>
30
29 <div class="modal__reg-item form-group"> 31 <div class="modal__reg-item form-group">
30 <label class="form-group__label">Подтвердить пароль</label> 32 <label class="form-group__label">Подтвердить пароль</label>
31 <div class="form-group__item"> 33 <div class="form-group__item">
32 <input type="password" class="input" placeholder="**********" required> 34 <input type="password" name="password_confirmation_worker" id="password_confirmation_worker" class="input" placeholder="**********" required>
33 <button type="button" class="eye"> 35 <button type="button" class="eye">
34 <svg class="js-password-show"> 36 <svg class="js-password-show">
35 <use xlink:href="images/sprite.svg#eye"></use> 37 <use xlink:href="{{ asset('images/sprite.svg#eye') }}"></use>
36 </svg> 38 </svg>
37 <svg class="js-password-hide"> 39 <svg class="js-password-hide">
38 <use xlink:href="images/sprite.svg#eye-2"></use> 40 <use xlink:href="{{ asset('images/sprite.svg#eye-2') }}"></use>
39 </svg> 41 </svg>
40 </button> 42 </button>
41 </div> 43 </div>
42 </div> 44 </div>
45
43 <div class="modal__reg-item form-group"> 46 <div class="modal__reg-item form-group">
44 <label class="form-group__label">Статус</label> 47 <label class="form-group__label">Фамилия</label>
45 <div class="form-group__item"> 48 <div class="form-group__item">
46 <div class="select"> 49 <input type="text" id="surname_worker" name="surname_worker" class="input" placeholder="Шестаков" required>
47 <select class="js-select2"> 50 </div>
48 <option selected disabled>Не указано</option> 51 </div>
49 <option>Вариант 1</option> 52
50 <option>Вариант 2</option> 53 <div class="modal__reg-item form-group">
51 <option>Вариант 3</option> 54 <label class="form-group__label">Имя</label>
52 <option>Вариант 4</option> 55 <div class="form-group__item">
53 <option>Вариант 5</option> 56 <input type="text" id="name_man_worker" name="name_man_worker" class="input" placeholder="Андрей" required>
54 <option>Вариант 6</option>
55 </select>
56 </div>
57 </div> 57 </div>
58 </div> 58 </div>
59
59 <div class="modal__reg-item form-group"> 60 <div class="modal__reg-item form-group">
60 <label class="form-group__label">Ф.И.О.</label> 61 <label class="form-group__label">Отчество</label>
61 <div class="form-group__item"> 62 <div class="form-group__item">
62 <input type="text" class="input" placeholder="Шестаков Михаил Юрьевич" required> 63 <input type="text" id="surname2_worker" name="surname2_worker" class="input" placeholder="Васильевич">
63 </div> 64 </div>
64 </div> 65 </div>
66 <!--
65 <div class="modal__reg-item form-group"> 67 <div class="modal__reg-item form-group">
66 <label class="form-group__label">Должность</label> 68 <label class="form-group__label">Должность</label>
67 <div class="form-group__item"> 69 <div class="form-group__item">
68 <input type="text" class="input" placeholder="Палуба" required> 70 <input type="text" class="input" placeholder="Палуба" required>
69 </div> 71 </div>
72 </div>-->
73
74 <div class="modal__reg-item form-group">
75 <label class="form-group__label">Должность</label>
76 <div class="form-group__item">
77 <div class="select">
78 <select class="js-select2" name="job_titles_worker" id="job_titles_worker">
79 <option selected>Не указано</option>
80 @if ($Job_titles->count())
81 @foreach($Job_titles as $it)
82 <option value="{{ $it->id }}">{{ $it->name }}</option>
83 @endforeach
84 @endif
85 </select>
86 </div>
87 </div>
70 </div> 88 </div>
89
71 <div class="modal__reg-item form-group"> 90 <div class="modal__reg-item form-group">
72 <label class="form-group__label">Номер телефона</label> 91 <label class="form-group__label">Номер телефона</label>
73 <div class="form-group__item"> 92 <div class="form-group__item">
74 <input type="tel" class="input" placeholder="+7 (___) ___-__-__" required> 93 <input type="tel" name="telephone_worker" id="telephone_worker" class="input" placeholder="+7 (___) ___-__-__" required>
75 </div> 94 </div>
76 </div> 95 </div>
77 <div class="modal__reg-item"> 96 <div class="modal__reg-item">
78 <img src="images/catpcha.jpg" alt="" class="captcha"> 97 <img src="images/catpcha.jpg" alt="" class="captcha">
79 </div> 98 </div>
99
80 <div class="modal__reg-item"> 100 <div class="modal__reg-item">
81 <label class="checkbox"> 101 <label class="checkbox">
82 <input type="checkbox" class="checkbox__input" required> 102 <input type="checkbox" name="politik_worker" id="politik_worker" class="checkbox__input" required>
83 <span class="checkbox__icon"> 103 <span class="checkbox__icon">
84 <svg> 104 <svg>
85 <use xlink:href="images/sprite.svg#v"></use> 105 <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use>
86 </svg> 106 </svg>
87 </span> 107 </span>
88 <span class="checkbox__text"> 108 <span class="checkbox__text">
89 <span> 109 <span>
90 Я согласен(на) с <a href="#">Политикой конфиденциальности</a> 110 Я согласен(на) с <a href="{{ route('page', ['pages' => 'Politika-konfidencialnosti']) }}">Политикой конфиденциальности</a>
91 </span> 111 </span>
92 </span> 112 </span>
93 </label> 113 </label>
94 </div> 114 </div>
95 <button type="submit" class="button">Зарегистрироваться</button> 115 <button type="submit" id="button_reg_worker" name="button_reg_worker" class="button">Зарегистрироваться</button>
96 </form> 116 </form>
117
97 <form class="modal__reg" data-body="2"> 118 <form class="modal__reg" data-body="2">
98 <div class="modal__reg-item form-group"> 119 <div class="modal__reg-item form-group">
99 <label class="form-group__label">Электронная почта</label> 120 <label class="form-group__label">Электронная почта</label>
100 <div class="form-group__item"> 121 <div class="form-group__item">
101 <input type="email" class="input" placeholder="info@rekamore.su" required> 122 <input type="email" class="input" placeholder="info@rekamore.su" required>
102 </div> 123 </div>
103 </div> 124 </div>
104 <div class="modal__reg-item form-group"> 125 <div class="modal__reg-item form-group">
105 <label class="form-group__label">Пароль</label> 126 <label class="form-group__label">Пароль</label>
106 <div class="form-group__item"> 127 <div class="form-group__item">
107 <input type="password" class="input" placeholder="**********" required> 128 <input type="password" class="input" placeholder="**********" required>
108 <button type="button" class="eye"> 129 <button type="button" class="eye">
109 <svg class="js-password-show"> 130 <svg class="js-password-show">
110 <use xlink:href="images/sprite.svg#eye"></use> 131 <use xlink:href="images/sprite.svg#eye"></use>
111 </svg> 132 </svg>
112 <svg class="js-password-hide"> 133 <svg class="js-password-hide">
113 <use xlink:href="images/sprite.svg#eye-2"></use> 134 <use xlink:href="images/sprite.svg#eye-2"></use>
114 </svg> 135 </svg>
115 </button> 136 </button>
116 </div> 137 </div>
117 </div> 138 </div>
118 <div class="modal__reg-item form-group"> 139 <div class="modal__reg-item form-group">
119 <label class="form-group__label">Подтвердить пароль</label> 140 <label class="form-group__label">Подтвердить пароль</label>
120 <div class="form-group__item"> 141 <div class="form-group__item">
121 <input type="password" class="input" placeholder="**********" required> 142 <input type="password" class="input" placeholder="**********" required>
122 <button type="button" class="eye"> 143 <button type="button" class="eye">
123 <svg class="js-password-show"> 144 <svg class="js-password-show">
124 <use xlink:href="images/sprite.svg#eye"></use> 145 <use xlink:href="images/sprite.svg#eye"></use>
125 </svg> 146 </svg>
126 <svg class="js-password-hide"> 147 <svg class="js-password-hide">
127 <use xlink:href="images/sprite.svg#eye-2"></use> 148 <use xlink:href="images/sprite.svg#eye-2"></use>
128 </svg> 149 </svg>
129 </button> 150 </button>
130 </div> 151 </div>
131 </div> 152 </div>
132 <div class="modal__reg-item form-group"> 153 <div class="modal__reg-item form-group">
133 <label class="form-group__label">Номер телефона</label> 154 <label class="form-group__label">Номер телефона</label>
134 <div class="form-group__item"> 155 <div class="form-group__item">
135 <input type="tel" class="input" placeholder="+7 (___) ___-__-__" required> 156 <input type="tel" class="input" placeholder="+7 (___) ___-__-__" required>
136 </div> 157 </div>
137 </div> 158 </div>
138 <div class="modal__reg-item form-group"> 159 <div class="modal__reg-item form-group">
139 <label class="form-group__label">Название судоходной компании</label> 160 <label class="form-group__label">Название судоходной компании</label>
140 <div class="form-group__item"> 161 <div class="form-group__item">
141 <input type="text" class="input" placeholder="ООО Река Море" required> 162 <input type="text" class="input" placeholder="ООО Река Море" required>
142 </div> 163 </div>
143 </div> 164 </div>
144 <div class="modal__reg-item"> 165 <div class="modal__reg-item">
145 <img src="images/catpcha.jpg" alt="" class="captcha"> 166 <img src="images/catpcha.jpg" alt="" class="captcha">
146 </div> 167 </div>
147 <div class="modal__reg-item"> 168 <div class="modal__reg-item">
148 <label class="checkbox"> 169 <label class="checkbox">
149 <input type="checkbox" class="checkbox__input" required> 170 <input type="checkbox" class="checkbox__input" required>
150 <span class="checkbox__icon"> 171 <span class="checkbox__icon">
151 <svg> 172 <svg>
152 <use xlink:href="images/sprite.svg#v"></use> 173 <use xlink:href="images/sprite.svg#v"></use>
153 </svg> 174 </svg>
154 </span> 175 </span>
155 <span class="checkbox__text"> 176 <span class="checkbox__text">
156 <span> 177 <span>
157 Я согласен(на) с <a href="#">Политикой конфиденциальности</a> 178 Я согласен(на) с <a href="#">Политикой конфиденциальности</a>
158 </span> 179 </span>
159 </span> 180 </span>
160 </label> 181 </label>
161 </div> 182 </div>
162 <button type="submit" class="button">Зарегистрироваться</button> 183 <button type="submit" id="button_reg_employer" name="button_reg_employer" class="button">Зарегистрироваться</button>
163 </form> 184 </form>
164 <div class="modal__text"> 185 <div class="modal__text">
165 <span>Вспомнили пароль?</span> 186 <span>Вспомнили пароль?</span>
166 &nbsp; 187 &nbsp;
167 <a href="#">Войти</a> 188 <a data-fancybox data-src="#sign" data-options='{"touch":false,"autoFocus":false}'>Войти</a>
168 </div> 189 </div>
resources/views/modals/send_login.blade.php
1 <div id="sign" class="modal"> 1 <div id="sign" class="modal">
2 <div class="modal__body"> 2 <div class="modal__body">
3 <div class="modal__title left">Войти</div> 3 <div class="modal__title left">Войти</div>
4 <form class="modal__sign"> 4 <form class="modal__sign">
5 <div id="message_error" name="message_error"> 5 <div id="message_error" name="message_error">
6 </div> 6 </div>
7 <div class="modal__sign-item"> 7 <div class="modal__sign-item">
8 <input type="email" class="input" id="email" name="email" placeholder="E-mail" required> 8 <input type="email" class="input" id="email" name="email" placeholder="E-mail" required>
9 </div> 9 </div>
10 <div class="modal__sign-item"> 10 <div class="modal__sign-item">
11 <input type="password" class="input" id="password" name="password" placeholder="Пароль" required> 11 <input type="password" class="input" id="password" name="password" placeholder="Пароль" required>
12 <button type="button" class="eye"> 12 <button type="button" class="eye">
13 <svg class="js-password-show"> 13 <svg class="js-password-show">
14 <use xlink:href="{{ asset('images/sprite.svg#eye') }}"></use> 14 <use xlink:href="{{ asset('images/sprite.svg#eye') }}"></use>
15 </svg> 15 </svg>
16 <svg class="js-password-hide"> 16 <svg class="js-password-hide">
17 <use xlink:href="{{ asset('images/sprite.svg#eye-2') }}"></use> 17 <use xlink:href="{{ asset('images/sprite.svg#eye-2') }}"></use>
18 </svg> 18 </svg>
19 </button> 19 </button>
20 </div> 20 </div>
21 <div class="modal__sign-item"> 21 <div class="modal__sign-item">
22 <div class="modal__sign-bottom"> 22 <div class="modal__sign-bottom">
23 <div> 23 <div>
24 <label class="checkbox"> 24 <label class="checkbox">
25 <input type="checkbox" id="save_me" name="save_me" class="checkbox__input" required> 25 <input type="checkbox" id="save_me" name="save_me" class="checkbox__input" required>
26 <span class="checkbox__icon"> 26 <span class="checkbox__icon">
27 <svg> 27 <svg>
28 <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use> 28 <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use>
29 </svg> 29 </svg>
30 </span> 30 </span>
31 <span class="checkbox__text"> 31 <span class="checkbox__text">
32 <span> 32 <span>
33 Запомнить меня 33 Запомнить меня
34 </span> 34 </span>
35 </span> 35 </span>
36 </label> 36 </label>
37 </div> 37 </div>
38 <div> 38 <div>
39 <a href="" class="modal__sign-bottom-link">Забыли пароль?</a> 39 <a href="" class="modal__sign-bottom-link">Забыли пароль?</a>
40 </div> 40 </div>
41 </div> 41 </div>
42 </div> 42 </div>
43 <div class="modal__sign-item"> 43 <div class="modal__sign-item">
44 <a id="button_send" name="button_send" class="button">Войти</a> 44 <a id="button_send" name="button_send" class="button">Войти</a>
45 </div> 45 </div>
46 </form> 46 </form>
47 <div class="modal__text"> 47 <div class="modal__text">
48 <span>У Вас ещё нет аккаунта?</span> 48 <span>У Вас ещё нет аккаунта?</span>
49 &nbsp; 49 &nbsp;
50 <a href="">Создать аккаунт</a> 50 <a data-fancybox data-src="#reg" data-options='{"touch":false,"autoFocus":false}'>Создать аккаунт</a>
51 </div> 51 </div>
52 </div> 52 </div>
53 </div> 53 </div>
54 54
resources/views/workers/delete_profile.blade.php
1 @extends('layout.frontend', ['title' => 'Удаление профиля - РекаМоре']) 1 @extends('layout.frontend', ['title' => 'Удаление профиля - РекаМоре'])
2 2
3 @section('scripts') 3 @section('scripts')
4 4
5 @endsection 5 @endsection
6 6
7 @section('content') 7 @section('content')
8 <section class="cabinet"> 8 <section class="cabinet">
9 <div class="container"> 9 <div class="container">
10 <ul class="breadcrumbs cabinet__breadcrumbs"> 10 <ul class="breadcrumbs cabinet__breadcrumbs">
11 <li><a href="{{ route('index') }}">Главная</a></li> 11 <li><a href="{{ route('index') }}">Главная</a></li>
12 <li><b>Личный кабинет</b></li> 12 <li><b>Личный кабинет</b></li>
13 </ul> 13 </ul>
14 <div class="cabinet__wrapper"> 14 <div class="cabinet__wrapper">
15 <div class="cabinet__side"> 15 <div class="cabinet__side">
16 <div class="cabinet__side-toper"> 16 <div class="cabinet__side-toper">
17 @include('employers.emblema') 17 @include('workers.emblema')
18 18
19 </div> 19 </div>
20 20
21 @include('workers.menu', ['item' => 5]) 21 @include('workers.menu', ['item' => 5])
22 </div> 22 </div>
23 <div class="cabinet__body"> 23 <div class="cabinet__body">
24 <div class="cabinet__body-item"> 24 <div class="cabinet__body-item">
25 <h2 class="title cabinet__title">Удалить профиль</h2> 25 <h2 class="title cabinet__title">Удалить профиль</h2>
26 <p class="cabinet__text"><b>Вы уверены, что хотите удалить свой профиль?</b></p> 26 <p class="cabinet__text"><b>Вы уверены, что хотите удалить свой профиль?</b></p>
27 <div class="notify notify_red"> 27 <div class="notify notify_red">
28 <svg> 28 <svg>
29 <use xlink:href="images/sprite.svg#i"></use> 29 <use xlink:href="images/sprite.svg#i"></use>
30 </svg> 30 </svg>
31 <span>Это действие не может быть отменено!</span> 31 <span>Это действие не может быть отменено!</span>
32 </div> 32 </div>
33 <form class="cabinet__inputs"> 33 <form class="cabinet__inputs">
34 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 34 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
35 <label class="form-group__label">Пожалуйста, введите пароль от учётной записи для подтверждения:</label> 35 <label class="form-group__label">Пожалуйста, введите пароль от учётной записи для подтверждения:</label>
36 <div class="form-group__item"> 36 <div class="form-group__item">
37 <input type="password" class="input" placeholder="**********" required> 37 <input type="password" class="input" placeholder="**********" required>
38 <button type="button" class="eye"> 38 <button type="button" class="eye">
39 <svg class="js-password-show"> 39 <svg class="js-password-show">
40 <use xlink:href="images/sprite.svg#eye"></use> 40 <use xlink:href="images/sprite.svg#eye"></use>
41 </svg> 41 </svg>
42 <svg class="js-password-hide"> 42 <svg class="js-password-hide">
43 <use xlink:href="images/sprite.svg#eye-2"></use> 43 <use xlink:href="images/sprite.svg#eye-2"></use>
44 </svg> 44 </svg>
45 </button> 45 </button>
46 </div> 46 </div>
47 </div> 47 </div>
48 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 48 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
49 <div class="buttons"> 49 <div class="buttons">
50 <button type="submit" class="button">Отменить</button> 50 <button type="submit" class="button">Отменить</button>
51 <a href="#" class="button button_light">Удалить профиль</a> 51 <a href="#" class="button button_light">Удалить профиль</a>
52 </div> 52 </div>
53 </div> 53 </div>
54 </form> 54 </form>
55 </div> 55 </div>
56 </div> 56 </div>
57 </div> 57 </div>
58 </div> 58 </div>
59 </section> 59 </section>
60 </div> 60 </div>
61 <div> 61 <div>
62 @endsection 62 @endsection
63 63
resources/views/workers/favorite.blade.php
1 @extends('layout.frontend', ['title' => 'Избранные - РекаМоре']) 1 @extends('layout.frontend', ['title' => 'Избранные - РекаМоре'])
2 2
3 @section('scripts') 3 @section('scripts')
4 4
5 @endsection 5 @endsection
6 6
7 @section('content') 7 @section('content')
8 <section class="cabinet"> 8 <section class="cabinet">
9 <div class="container"> 9 <div class="container">
10 <ul class="breadcrumbs cabinet__breadcrumbs"> 10 <ul class="breadcrumbs cabinet__breadcrumbs">
11 <li><a href="{{ route('index') }}">Главная</a></li> 11 <li><a href="{{ route('index') }}">Главная</a></li>
12 <li><b>Личный кабинет</b></li> 12 <li><b>Личный кабинет</b></li>
13 </ul> 13 </ul>
14 <div class="cabinet__wrapper"> 14 <div class="cabinet__wrapper">
15 <div class="cabinet__side"> 15 <div class="cabinet__side">
16 <div class="cabinet__side-toper"> 16 <div class="cabinet__side-toper">
17 @include('employers.emblema') 17 @include('workers.emblema')
18 18
19 </div> 19 </div>
20 20
21 @include('workers.menu', ['item' => 3]) 21 @include('workers.menu', ['item' => 3])
22 </div> 22 </div>
23 23
24 <div class="cabinet__body"> 24 <div class="cabinet__body">
25 <div class="cabinet__body-item"> 25 <div class="cabinet__body-item">
26 <h2 class="title cabinet__title">Избранные вакансии</h2> 26 <h2 class="title cabinet__title">Избранные вакансии</h2>
27 </div> 27 </div>
28 <div class="cabinet__body-item"> 28 <div class="cabinet__body-item">
29 <div class="cabinet__filters"> 29 <div class="cabinet__filters">
30 <div class="cabinet__filters-item"> 30 <div class="cabinet__filters-item">
31 <form class="search"> 31 <form class="search">
32 <input type="search" class="input" placeholder="Поиск&hellip;" required> 32 <input type="search" class="input" placeholder="Поиск&hellip;" required>
33 <button type="submit" class="button">Найти</button> 33 <button type="submit" class="button">Найти</button>
34 <span> 34 <span>
35 <svg> 35 <svg>
36 <use xlink:href="images/sprite.svg#search"></use> 36 <use xlink:href="images/sprite.svg#search"></use>
37 </svg> 37 </svg>
38 </span> 38 </span>
39 </form> 39 </form>
40 </div> 40 </div>
41 <div class="cabinet__filters-item"> 41 <div class="cabinet__filters-item">
42 <div class="select"> 42 <div class="select">
43 <select class="js-select2"> 43 <select class="js-select2">
44 <option>Сортировка (по умолчанию)</option> 44 <option>Сортировка (по умолчанию)</option>
45 <option>Вариант 1</option> 45 <option>Вариант 1</option>
46 <option>Вариант 2</option> 46 <option>Вариант 2</option>
47 <option>Вариант 3</option> 47 <option>Вариант 3</option>
48 </select> 48 </select>
49 </div> 49 </div>
50 </div> 50 </div>
51 </div> 51 </div>
52 <div class="notify"> 52 <div class="notify">
53 <svg> 53 <svg>
54 <use xlink:href="images/sprite.svg#i"></use> 54 <use xlink:href="images/sprite.svg#i"></use>
55 </svg> 55 </svg>
56 <span>Нет избранных работодателей</span> 56 <span>Нет избранных работодателей</span>
57 </div> 57 </div>
58 </div> 58 </div>
59 </div> 59 </div>
60 </div> 60 </div>
61 </div> 61 </div>
62 </section> 62 </section>
63 63
64 </div> <!-- END TOP WRAPPER --> 64 </div> <!-- END TOP WRAPPER -->
65 65
66 @endsection 66 @endsection
67 67
resources/views/workers/messages.blade.php
1 @extends('layout.frontend', ['title' => 'Мои сообщения - РекаМоре']) 1 @extends('layout.frontend', ['title' => 'Мои сообщения - РекаМоре'])
2 2
3 @section('scripts') 3 @section('scripts')
4 4
5 @endsection 5 @endsection
6 6
7 @section('content') 7 @section('content')
8 <section class="cabinet"> 8 <section class="cabinet">
9 <div class="container"> 9 <div class="container">
10 <ul class="breadcrumbs cabinet__breadcrumbs"> 10 <ul class="breadcrumbs cabinet__breadcrumbs">
11 <li><a href="{{ route('index') }}">Главная</a></li> 11 <li><a href="{{ route('index') }}">Главная</a></li>
12 <li><b>Личный кабинет</b></li> 12 <li><b>Личный кабинет</b></li>
13 </ul> 13 </ul>
14 <div class="cabinet__wrapper"> 14 <div class="cabinet__wrapper">
15 <div class="cabinet__side"> 15 <div class="cabinet__side">
16 <div class="cabinet__side-toper"> 16 <div class="cabinet__side-toper">
17 @include('employers.emblema') 17 @include('workers.emblema')
18 18
19 </div> 19 </div>
20 20
21 @include('workers.menu', ['item' => 2]) 21 @include('workers.menu', ['item' => 2])
22 </div> 22 </div>
23 <div class="cabinet__body"> 23 <div class="cabinet__body">
24 <div class="cabinet__body-item"> 24 <div class="cabinet__body-item">
25 <h2 class="title cabinet__title">Сообщения</h2> 25 <h2 class="title cabinet__title">Сообщения</h2>
26 </div> 26 </div>
27 <div class="cabinet__body-item"> 27 <div class="cabinet__body-item">
28 <div class="cabinet__filters"> 28 <div class="cabinet__filters">
29 <div class="cabinet__filters-item"> 29 <div class="cabinet__filters-item">
30 <div class="cabinet__filters-buttons"> 30 <div class="cabinet__filters-buttons">
31 <a href="{{ route('worker.messages', ['type_message' => 'input']) }}" class="button button_light @if ($type_message == 'input') active @endif">Входящие ({{ $count_input }})</a> 31 <a href="{{ route('worker.messages', ['type_message' => 'input']) }}" class="button button_light @if ($type_message == 'input') active @endif">Входящие ({{ $count_input }})</a>
32 <a href="{{ route('worker.messages', ['type_message' => 'output']) }}" class="button button_light @if ($type_message == 'output') active @endif">Исходящие ({{ $count_output }})</a> 32 <a href="{{ route('worker.messages', ['type_message' => 'output']) }}" class="button button_light @if ($type_message == 'output') active @endif">Исходящие ({{ $count_output }})</a>
33 </div> 33 </div>
34 </div> 34 </div>
35 <div class="cabinet__filters-item"> 35 <div class="cabinet__filters-item">
36 <div class="select"> 36 <div class="select">
37 <select class="js-select2" id="sort_ajax" name="sort_ajax"> 37 <select class="js-select2" id="sort_ajax" name="sort_ajax">
38 <option value="default">Сортировка (по умолчанию)</option> 38 <option value="default">Сортировка (по умолчанию)</option>
39 <option value="name (asc)">По имени (возрастание)</option> 39 <option value="name (asc)">По имени (возрастание)</option>
40 <option value="name (desc)">По имени (убывание)</option> 40 <option value="name (desc)">По имени (убывание)</option>
41 <option value="created_at (asc)">По дате (возрастание)</option> 41 <option value="created_at (asc)">По дате (возрастание)</option>
42 <option value="created_at (desc)">По дате (убывание)</option> 42 <option value="created_at (desc)">По дате (убывание)</option>
43 </select> 43 </select>
44 </div> 44 </div>
45 </div> 45 </div>
46 </div> 46 </div>
47 47
48 @if ($messages->count()) 48 @if ($messages->count())
49 @foreach($messages as $it) 49 @foreach($messages as $it)
50 <div class="messages__item"> 50 <div class="messages__item">
51 <div class="messages__item-info"> 51 <div class="messages__item-info">
52 <div class="messages__item-photo"> 52 <div class="messages__item-photo">
53 <svg> 53 <svg>
54 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> 54 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use>
55 </svg> 55 </svg>
56 56
57 @if ($type_message == 'input') 57 @if ($type_message == 'input')
58 @if ($it->user_to->is_worker) 58 @if ($it->user_to->is_worker)
59 @if (isset($it->user_to->workers->phote)) 59 @if (isset($it->user_to->workers->phote))
60 <img src="{{ asset(Storage::url($it->user_to->workers->phote)) }}" alt=""> 60 <img src="{{ asset(Storage::url($it->user_to->workers->phote)) }}" alt="">
61 @else 61 @else
62 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 62 <img src="{{ asset('images/default_man.jpg') }}" alt="">
63 @endif 63 @endif
64 @else 64 @else
65 @if (isset($it->user_to->employers->logo)) 65 @if (isset($it->user_to->employers->logo))
66 <img src="{{ asset(Storage::url($it->user_to->employers->logo)) }}" alt=""> 66 <img src="{{ asset(Storage::url($it->user_to->employers->logo)) }}" alt="">
67 @else 67 @else
68 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 68 <img src="{{ asset('images/default_man.jpg') }}" alt="">
69 @endif 69 @endif
70 @endif 70 @endif
71 @endif 71 @endif
72 72
73 @if ($type_message == 'output') 73 @if ($type_message == 'output')
74 @if ($it->user_from->is_worker) 74 @if ($it->user_from->is_worker)
75 @if (isset($it->user_from->workers->phote)) 75 @if (isset($it->user_from->workers->phote))
76 <img src="{{ asset(Storage::url($it->user_from->workers->phote)) }}" alt=""> 76 <img src="{{ asset(Storage::url($it->user_from->workers->phote)) }}" alt="">
77 @else 77 @else
78 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 78 <img src="{{ asset('images/default_man.jpg') }}" alt="">
79 @endif 79 @endif
80 @else 80 @else
81 @if (isset($it->user_from->employers->logo)) 81 @if (isset($it->user_from->employers->logo))
82 <img src="{{ asset(Storage::url($it->user_from->employers->logo)) }}" alt=""> 82 <img src="{{ asset(Storage::url($it->user_from->employers->logo)) }}" alt="">
83 @else 83 @else
84 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 84 <img src="{{ asset('images/default_man.jpg') }}" alt="">
85 @endif 85 @endif
86 @endif 86 @endif
87 @endif 87 @endif
88 </div> 88 </div>
89 <div class="messages__item-text"> 89 <div class="messages__item-text">
90 <div> 90 <div>
91 От: @if (isset($it->user_from)) 91 От: @if (isset($it->user_from))
92 @if ($it->user_from->id !== $user_id) 92 @if ($it->user_from->id !== $user_id)
93 <a href="{{ route('employer.dialog', ['user1' => $user_id, 'user2' => $it->user_from->id]) }}" style="text-decoration: underline"> 93 <a href="{{ route('employer.dialog', ['user1' => $user_id, 'user2' => $it->user_from->id]) }}" style="text-decoration: underline">
94 {{ $it->user_from->surname." ".$it->user_from->name_man." ".$it->user_from->surname2." (".$it->user_from->id.")" }} 94 {{ $it->user_from->surname." ".$it->user_from->name_man." ".$it->user_from->surname2." (".$it->user_from->id.")" }}
95 </a> 95 </a>
96 @else 96 @else
97 {{ $it->user_from->surname." ".$it->user_from->name_man." ".$it->user_from->surname2." (".$it->user_from->id.")" }} 97 {{ $it->user_from->surname." ".$it->user_from->name_man." ".$it->user_from->surname2." (".$it->user_from->id.")" }}
98 @endif 98 @endif
99 @else 99 @else
100 Удаленный пользователь 100 Удаленный пользователь
101 @endif 101 @endif
102 <br> 102 <br>
103 К: @if (isset($it->user_to)) 103 К: @if (isset($it->user_to))
104 @if ($it->user_to->id !== $user_id) 104 @if ($it->user_to->id !== $user_id)
105 <a href="{{ route('employer.dialog', ['user1' => $user_id, 'user2' => $it->user_to->id]) }}" style="text-decoration: underline"> 105 <a href="{{ route('employer.dialog', ['user1' => $user_id, 'user2' => $it->user_to->id]) }}" style="text-decoration: underline">
106 {{ $it->user_to->surname." ".$it->user_to->name_man." ".$it->user_to->surname2." (".$it->user_to->id.")" }} 106 {{ $it->user_to->surname." ".$it->user_to->name_man." ".$it->user_to->surname2." (".$it->user_to->id.")" }}
107 </a> 107 </a>
108 @else 108 @else
109 {{ $it->user_to->surname." ".$it->user_to->name_man." ".$it->user_to->surname2." (".$it->user_to->id.")" }} 109 {{ $it->user_to->surname." ".$it->user_to->name_man." ".$it->user_to->surname2." (".$it->user_to->id.")" }}
110 @endif 110 @endif
111 @else 111 @else
112 Удаленный пользователь 112 Удаленный пользователь
113 @endif 113 @endif
114 </div> 114 </div>
115 <div><span>Вакансия:</span>@if (isset($it->vacancies[0])) {{ $it->vacancies[0]->name." (".($it->vacancies[0]->id).")" }} @else Удалена @endif</div> 115 <div><span>Вакансия:</span>@if (isset($it->vacancies[0])) {{ $it->vacancies[0]->name." (".($it->vacancies[0]->id).")" }} @else Удалена @endif</div>
116 <div><span>Текст:</span>{{ $it->text }}</div> 116 <div><span>Текст:</span>{{ $it->text }}</div>
117 </div> 117 </div>
118 </div> 118 </div>
119 <div class="messages__item-date">{{ $it->created_at }}</div> 119 <div class="messages__item-date">{{ $it->created_at }}</div>
120 </div> 120 </div>
121 @endforeach 121 @endforeach
122 @else 122 @else
123 <div class="notify"> 123 <div class="notify">
124 <svg> 124 <svg>
125 <use xlink:href="images/sprite.svg#i"></use> 125 <use xlink:href="images/sprite.svg#i"></use>
126 </svg> 126 </svg>
127 <span>Сообщений не найдено</span> 127 <span>Сообщений не найдено</span>
128 </div> 128 </div>
129 @endif 129 @endif
130 </div> 130 </div>
131 </div> 131 </div>
132 </div> 132 </div>
133 </div> 133 </div>
134 </section> 134 </section>
135 </div> 135 </div>
136 <div> 136 <div>
137 @endsection 137 @endsection
138 138
resources/views/workers/new_password.blade.php
1 @extends('layout.frontend', ['title' => 'Смена пароля - РекаМоре']) 1 @extends('layout.frontend', ['title' => 'Смена пароля - РекаМоре'])
2 2
3 @section('scripts') 3 @section('scripts')
4 4
5 @endsection 5 @endsection
6 6
7 @section('content') 7 @section('content')
8 <section class="cabinet"> 8 <section class="cabinet">
9 <div class="container"> 9 <div class="container">
10 <ul class="breadcrumbs cabinet__breadcrumbs"> 10 <ul class="breadcrumbs cabinet__breadcrumbs">
11 <li><a href="{{ route('index') }}">Главная</a></li> 11 <li><a href="{{ route('index') }}">Главная</a></li>
12 <li><b>Личный кабинет</b></li> 12 <li><b>Личный кабинет</b></li>
13 </ul> 13 </ul>
14 <div class="cabinet__wrapper"> 14 <div class="cabinet__wrapper">
15 <div class="cabinet__side"> 15 <div class="cabinet__side">
16 <div class="cabinet__side-toper"> 16 <div class="cabinet__side-toper">
17 @include('employers.emblema') 17 @include('workers.emblema')
18 18
19 </div> 19 </div>
20 20
21 @include('workers.menu', ['item' => 4]) 21 @include('workers.menu', ['item' => 4])
22 </div> 22 </div>
23 <div class="cabinet__body"> 23 <div class="cabinet__body">
24 <div class="cabinet__body-item"> 24 <div class="cabinet__body-item">
25 <h2 class="title cabinet__title">Сменить пароль</h2> 25 <h2 class="title cabinet__title">Сменить пароль</h2>
26 </div> 26 </div>
27 <div class="cabinet__body-item"> 27 <div class="cabinet__body-item">
28 <form class="cabinet__inputs"> 28 <form class="cabinet__inputs">
29 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 29 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
30 <label class="form-group__label">Старый пароль</label> 30 <label class="form-group__label">Старый пароль</label>
31 <div class="form-group__item"> 31 <div class="form-group__item">
32 <input type="password" class="input" placeholder="**********" required> 32 <input type="password" class="input" placeholder="**********" required>
33 <button type="button" class="eye"> 33 <button type="button" class="eye">
34 <svg class="js-password-show"> 34 <svg class="js-password-show">
35 <use xlink:href="images/sprite.svg#eye"></use> 35 <use xlink:href="images/sprite.svg#eye"></use>
36 </svg> 36 </svg>
37 <svg class="js-password-hide"> 37 <svg class="js-password-hide">
38 <use xlink:href="images/sprite.svg#eye-2"></use> 38 <use xlink:href="images/sprite.svg#eye-2"></use>
39 </svg> 39 </svg>
40 </button> 40 </button>
41 </div> 41 </div>
42 </div> 42 </div>
43 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 43 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
44 <label class="form-group__label">Новый пароль</label> 44 <label class="form-group__label">Новый пароль</label>
45 <div class="form-group__item"> 45 <div class="form-group__item">
46 <input type="password" class="input" placeholder="**********" required> 46 <input type="password" class="input" placeholder="**********" required>
47 <button type="button" class="eye"> 47 <button type="button" class="eye">
48 <svg class="js-password-show"> 48 <svg class="js-password-show">
49 <use xlink:href="images/sprite.svg#eye"></use> 49 <use xlink:href="images/sprite.svg#eye"></use>
50 </svg> 50 </svg>
51 <svg class="js-password-hide"> 51 <svg class="js-password-hide">
52 <use xlink:href="images/sprite.svg#eye-2"></use> 52 <use xlink:href="images/sprite.svg#eye-2"></use>
53 </svg> 53 </svg>
54 </button> 54 </button>
55 </div> 55 </div>
56 </div> 56 </div>
57 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 57 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
58 <label class="form-group__label">Повторите новый пароль</label> 58 <label class="form-group__label">Повторите новый пароль</label>
59 <div class="form-group__item"> 59 <div class="form-group__item">
60 <input type="password" class="input" placeholder="**********" required> 60 <input type="password" class="input" placeholder="**********" required>
61 <button type="button" class="eye"> 61 <button type="button" class="eye">
62 <svg class="js-password-show"> 62 <svg class="js-password-show">
63 <use xlink:href="images/sprite.svg#eye"></use> 63 <use xlink:href="images/sprite.svg#eye"></use>
64 </svg> 64 </svg>
65 <svg class="js-password-hide"> 65 <svg class="js-password-hide">
66 <use xlink:href="images/sprite.svg#eye-2"></use> 66 <use xlink:href="images/sprite.svg#eye-2"></use>
67 </svg> 67 </svg>
68 </button> 68 </button>
69 </div> 69 </div>
70 </div> 70 </div>
71 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 71 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
72 <button type="submit" class="button">Сохранить</button> 72 <button type="submit" class="button">Сохранить</button>
73 </div> 73 </div>
74 </form> 74 </form>
75 </div> 75 </div>
76 </div> 76 </div>
77 </div> 77 </div>
78 </div> 78 </div>
79 </section> 79 </section>
80 </div> 80 </div>
81 <div> 81 <div>
82 @endsection 82 @endsection
83 83
1 <?php 1 <?php
2 2
3 use App\Http\Controllers\AdEmployerController; 3 use App\Http\Controllers\AdEmployerController;
4 use App\Http\Controllers\Admin\AdminController; 4 use App\Http\Controllers\Admin\AdminController;
5 use App\Http\Controllers\Admin\CategoryController; 5 use App\Http\Controllers\Admin\CategoryController;
6 use App\Http\Controllers\Admin\CategoryEmpController; 6 use App\Http\Controllers\Admin\CategoryEmpController;
7 use App\Http\Controllers\Admin\EducationController; 7 use App\Http\Controllers\Admin\EducationController;
8 use App\Http\Controllers\Admin\EmployersController; 8 use App\Http\Controllers\Admin\EmployersController;
9 use App\Http\Controllers\EmployerController as FrontEmployersController; 9 use App\Http\Controllers\EmployerController as FrontEmployersController;
10 use App\Http\Controllers\Admin\InfoBloksController; 10 use App\Http\Controllers\Admin\InfoBloksController;
11 use App\Http\Controllers\Admin\JobTitlesController; 11 use App\Http\Controllers\Admin\JobTitlesController;
12 use App\Http\Controllers\Admin\UsersController; 12 use App\Http\Controllers\Admin\UsersController;
13 use App\Http\Controllers\Admin\WorkersController; 13 use App\Http\Controllers\Admin\WorkersController;
14 use App\Http\Controllers\Auth\ForgotPasswordController; 14 use App\Http\Controllers\Auth\ForgotPasswordController;
15 use App\Http\Controllers\Auth\LoginController; 15 use App\Http\Controllers\Auth\LoginController;
16 use App\Http\Controllers\Auth\RegisterController; 16 use App\Http\Controllers\Auth\RegisterController;
17 use App\Http\Controllers\CKEditorController; 17 use App\Http\Controllers\CKEditorController;
18 use App\Http\Controllers\MediaController; 18 use App\Http\Controllers\MediaController;
19 use App\Http\Controllers\WorkerController; 19 use App\Http\Controllers\WorkerController;
20 use App\Models\User; 20 use App\Models\User;
21 use App\Http\Controllers\MainController; 21 use App\Http\Controllers\MainController;
22 use App\Http\Controllers\HomeController; 22 use App\Http\Controllers\HomeController;
23 use Illuminate\Support\Facades\Route; 23 use Illuminate\Support\Facades\Route;
24 use App\Http\Controllers\Admin\CompanyController; 24 use App\Http\Controllers\Admin\CompanyController;
25 use App\Http\Controllers\Admin\Ad_EmployersController; 25 use App\Http\Controllers\Admin\Ad_EmployersController;
26 use App\Http\Controllers\Admin\MsgAnswersController; 26 use App\Http\Controllers\Admin\MsgAnswersController;
27 use App\Http\Controllers\Admin\GroupsController; 27 use App\Http\Controllers\Admin\GroupsController;
28 use App\Http\Controllers\PagesController; 28 use App\Http\Controllers\PagesController;
29 use Illuminate\Support\Facades\Storage; 29 use Illuminate\Support\Facades\Storage;
30 use App\Http\Controllers\EmployerController; 30 use App\Http\Controllers\EmployerController;
31 use App\Http\Controllers\CompanyController as FrontCompanyController; 31 use App\Http\Controllers\CompanyController as FrontCompanyController;
32 32
33 33
34 /* 34 /*
35 |-------------------------------------------------------------------------- 35 |--------------------------------------------------------------------------
36 | Web Routes 36 | Web Routes
37 |-------------------------------------------------------------------------- 37 |--------------------------------------------------------------------------
38 | 38 |
39 | Here is where you can register web routes for your application. These 39 | Here is where you can register web routes for your application. These
40 | routes are loaded by the RouteServiceProvider within a group which 40 | routes are loaded by the RouteServiceProvider within a group which
41 | contains the "web" middleware group. Now create something great! 41 | contains the "web" middleware group. Now create something great!
42 | 42 |
43 */ 43 */
44 /* 44 /*
45 Route::get('/', function () { 45 Route::get('/', function () {
46 return view('welcome'); 46 return view('welcome');
47 })->name('index'); 47 })->name('index');
48 */ 48 */
49 Route::get('/', [MainController::class, 'index'])->name('index'); 49 Route::get('/', [MainController::class, 'index'])->name('index');
50 50
51 //Роуты авторизации, регистрации, восстановления, аутентификации 51 //Роуты авторизации, регистрации, восстановления, аутентификации
52 Auth::routes(['verify' => true]); 52 Auth::routes(['verify' => true]);
53 53
54 // роуты регистрации, авторизации, восстановления пароля, верификации почты 54 // роуты регистрации, авторизации, восстановления пароля, верификации почты
55 /*Route::group([ 55 /*Route::group([
56 'as' => 'auth.', //имя маршрута, например auth.index 56 'as' => 'auth.', //имя маршрута, например auth.index
57 'prefix' => 'auth', // префикс маршрута, например, auth/index 57 'prefix' => 'auth', // префикс маршрута, например, auth/index
58 ], function () { 58 ], function () {
59 //форма регистрации 59 //форма регистрации
60 Route::get('register', [RegisterController::class, 'register'])->name('register'); 60 Route::get('register', [RegisterController::class, 'register'])->name('register');
61 61
62 //создание пользователя 62 //создание пользователя
63 Route::post('register', [RegisterController::class, 'create'])->name('create'); 63 Route::post('register', [RegisterController::class, 'create'])->name('create');
64 64
65 //форма входа авторизации 65 //форма входа авторизации
66 Route::get('login', [LoginController::class, 'login'])->name('login'); 66 Route::get('login', [LoginController::class, 'login'])->name('login');
67 67
68 //аутентификация 68 //аутентификация
69 Route::post('login', [LoginController::class, 'authenticate'])->name('auth'); 69 Route::post('login', [LoginController::class, 'authenticate'])->name('auth');
70 70
71 //выход 71 //выход
72 Route::get('logout', [LoginController::class, 'logout'])->name('logout'); 72 Route::get('logout', [LoginController::class, 'logout'])->name('logout');
73 73
74 //форма ввода адреса почты 74 //форма ввода адреса почты
75 Route::get('forgot-password', [ForgotPasswordController::class, 'form'])->name('forgot-form'); 75 Route::get('forgot-password', [ForgotPasswordController::class, 'form'])->name('forgot-form');
76 76
77 //письмо на почту 77 //письмо на почту
78 Route::post('forgot-password', [ForgotPasswordController::class, 'mail'])->name('forgot-mail'); 78 Route::post('forgot-password', [ForgotPasswordController::class, 'mail'])->name('forgot-mail');
79 79
80 //форма восстановления пароля 80 //форма восстановления пароля
81 Route::get('reset-password/token/{token}/email/{email}', 81 Route::get('reset-password/token/{token}/email/{email}',
82 [ResetPasswordController::class, 'form'] 82 [ResetPasswordController::class, 'form']
83 )->name('reset-form'); 83 )->name('reset-form');
84 84
85 //восстановление пароля 85 //восстановление пароля
86 Route::post('reset-password', 86 Route::post('reset-password',
87 [ResetPasswordController::class, 'reset'] 87 [ResetPasswordController::class, 'reset']
88 )->name('reset-password'); 88 )->name('reset-password');
89 89
90 //сообщение о необходимости проверки адреса почты 90 //сообщение о необходимости проверки адреса почты
91 Route::get('verify-message', [VerifyEmailController::class, 'message'])->name('verify-message'); 91 Route::get('verify-message', [VerifyEmailController::class, 'message'])->name('verify-message');
92 92
93 //подтверждение адреса почты нового пользователя 93 //подтверждение адреса почты нового пользователя
94 Route::get('verify-email/token/{token}/id/{id}', [VerifyEmailController::class, 'verify']) 94 Route::get('verify-email/token/{token}/id/{id}', [VerifyEmailController::class, 'verify'])
95 ->where('token', '[a-f0-9]{32}') 95 ->where('token', '[a-f0-9]{32}')
96 ->where('id', '[0-9]+') 96 ->where('id', '[0-9]+')
97 ->name('verify-email'); 97 ->name('verify-email');
98 });*/ 98 });*/
99 99
100 //Личный кабинет пользователя 100 //Личный кабинет пользователя
101 Route::get('/home', [HomeController::class, 'index'])->name('home'); 101 Route::get('/home', [HomeController::class, 'index'])->name('home');
102 102
103 /* 103 /*
104 Route::post('resend/verification-email', function (\Illuminate\Http\Request $request) { 104 Route::post('resend/verification-email', function (\Illuminate\Http\Request $request) {
105 $user = User::where('email',$request->input('email'))->first(); 105 $user = User::where('email',$request->input('email'))->first();
106 106
107 $user->sendEmailVerificationNotification(); 107 $user->sendEmailVerificationNotification();
108 108
109 return 'your response'; 109 return 'your response';
110 })->middleware('throttle:6,1')->name('verification.resend'); 110 })->middleware('throttle:6,1')->name('verification.resend');
111 */ 111 */
112 112
113 // Авторизация, регистрация в админку 113 // Авторизация, регистрация в админку
114 Route::group([ 114 Route::group([
115 'as' => 'admin.', // имя маршрута, например auth.index 115 'as' => 'admin.', // имя маршрута, например auth.index
116 'prefix' => 'admin', // префикс маршрута, например auth/index 116 'prefix' => 'admin', // префикс маршрута, например auth/index
117 'middleware' => ['guest'], 117 'middleware' => ['guest'],
118 ], function () { 118 ], function () {
119 // Форма регистрации 119 // Форма регистрации
120 Route::get('register', [AdminController::class, 'register'])->name('register'); 120 Route::get('register', [AdminController::class, 'register'])->name('register');
121 // Создание пользователя 121 // Создание пользователя
122 Route::post('register', [AdminController::class, 'create'])->name('create'); 122 Route::post('register', [AdminController::class, 'create'])->name('create');
123 123
124 //Форма входа 124 //Форма входа
125 Route::get('login', [AdminController::class, 'login'])->name('login'); 125 Route::get('login', [AdminController::class, 'login'])->name('login');
126 126
127 // аутентификация 127 // аутентификация
128 Route::post('login', [AdminController::class, 'autenticate'])->name('auth'); 128 Route::post('login', [AdminController::class, 'autenticate'])->name('auth');
129 129
130 }); 130 });
131 131
132 // Личный кабинет админки 132 // Личный кабинет админки
133 Route::group([ 133 Route::group([
134 'as' => 'admin.', // имя маршрута, например auth.index 134 'as' => 'admin.', // имя маршрута, например auth.index
135 'prefix' => 'admin', // префикс маршрута, например auth/index 135 'prefix' => 'admin', // префикс маршрута, например auth/index
136 'middleware' => ['auth'], ['admin'], 136 'middleware' => ['auth'], ['admin'],
137 ], function() { 137 ], function() {
138 138
139 // выход 139 // выход
140 Route::get('logout', [AdminController::class, 'logout'])->name('logout'); 140 Route::get('logout', [AdminController::class, 'logout'])->name('logout');
141 141
142 // кабинет главная страница 142 // кабинет главная страница
143 Route::get('cabinet', [AdminController::class, 'index'])->name('index'); 143 Route::get('cabinet', [AdminController::class, 'index'])->name('index');
144 144
145 // кабинет профиль админа - форма 145 // кабинет профиль админа - форма
146 Route::get('profile', [AdminController::class, 'profile'])->name('profile'); 146 Route::get('profile', [AdminController::class, 'profile'])->name('profile');
147 // кабинет профиль админа - сохранение формы 147 // кабинет профиль админа - сохранение формы
148 Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile'); 148 Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile');
149 149
150 //кабинет сообщения админа 150 //кабинет сообщения админа
151 //Route::get('messages', [AdminController::class, 'profile'])->name('profile'); 151 //Route::get('messages', [AdminController::class, 'profile'])->name('profile');
152 152
153 153
154 // кабинет профиль - форма пароли 154 // кабинет профиль - форма пароли
155 Route::get('password', [AdminController::class, 'profile_password'])->name('password'); 155 Route::get('password', [AdminController::class, 'profile_password'])->name('password');
156 // кабинет профиль - сохранение формы пароля 156 // кабинет профиль - сохранение формы пароля
157 Route::post('password', [AdminController::class, 'profile_password_new'])->name('password'); 157 Route::post('password', [AdminController::class, 'profile_password_new'])->name('password');
158 158
159 159
160 // кабинет профиль пользователя - форма 160 // кабинет профиль пользователя - форма
161 Route::get('user-profile/{user}', [AdminController::class, 'profile_user'])->name('user-profile'); 161 Route::get('user-profile/{user}', [AdminController::class, 'profile_user'])->name('user-profile');
162 // кабинет профиль пользователя - сохранение формы 162 // кабинет профиль пользователя - сохранение формы
163 Route::post('user-profile/{user}', [AdminController::class, 'store_profile_user'])->name('user-store_profile'); 163 Route::post('user-profile/{user}', [AdminController::class, 'store_profile_user'])->name('user-store_profile');
164 164
165 // кабинет профиль работодатель - форма 165 // кабинет профиль работодатель - форма
166 Route::get('employer-profile/{employer}', [EmployersController::class, 'form_update_employer'])->name('employer-profile'); 166 Route::get('employer-profile/{employer}', [EmployersController::class, 'form_update_employer'])->name('employer-profile');
167 // кабинет профиль работодатель - сохранение формы 167 // кабинет профиль работодатель - сохранение формы
168 Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile'); 168 Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile');
169 // кабинет удаление профиль работодателя и юзера 169 // кабинет удаление профиль работодателя и юзера
170 Route::delete('employers/delete/{employer}/{user}', [EmployersController::class, 'delete_employer'])->name('delete-employer'); 170 Route::delete('employers/delete/{employer}/{user}', [EmployersController::class, 'delete_employer'])->name('delete-employer');
171 171
172 // кабинет профиль работник - форма 172 // кабинет профиль работник - форма
173 Route::get('worker-profile/add/{user}', [WorkersController::class, 'form_add_worker'])->name('worker-profile-add'); 173 Route::get('worker-profile/add/{user}', [WorkersController::class, 'form_add_worker'])->name('worker-profile-add');
174 Route::post('worker-profile/add/{user}', [WorkersController::class, 'form_store_worker'])->name('worker-profile-store'); 174 Route::post('worker-profile/add/{user}', [WorkersController::class, 'form_store_worker'])->name('worker-profile-store');
175 Route::get('worker-profile/{worker}', [WorkersController::class, 'form_edit_worker'])->name('worker-profile-edit'); 175 Route::get('worker-profile/{worker}', [WorkersController::class, 'form_edit_worker'])->name('worker-profile-edit');
176 // кабинет профиль работник - сохранение формы 176 // кабинет профиль работник - сохранение формы
177 Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile-update'); 177 Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile-update');
178 178
179 // Медиа 179 // Медиа
180 Route::get('media', [MediaController::class, 'index'])->name('media'); 180 Route::get('media', [MediaController::class, 'index'])->name('media');
181 Route::delete('media/{media}', [MediaController::class, 'delete'])->name('delete-media'); 181 Route::delete('media/{media}', [MediaController::class, 'delete'])->name('delete-media');
182 182
183 // кабинет настройки сайта - форма 183 // кабинет настройки сайта - форма
184 Route::get('config', [AdminController::class, 'config_form'])->name('config'); 184 Route::get('config', [AdminController::class, 'config_form'])->name('config');
185 // кабинет настройки сайта сохранение формы 185 // кабинет настройки сайта сохранение формы
186 Route::post('config', [AdminController::class, 'store_config'])->name('store_config'); 186 Route::post('config', [AdminController::class, 'store_config'])->name('store_config');
187 187
188 // кабинет - пользователи 188 // кабинет - пользователи
189 Route::get('users', [UsersController::class, 'index'])->name('users'); 189 Route::get('users', [UsersController::class, 'index'])->name('users');
190 190
191 // кабинет - пользователи 191 // кабинет - пользователи
192 Route::get('admin-users', [AdminController::class, 'index_admin'])->name('admin-users'); 192 Route::get('admin-users', [AdminController::class, 'index_admin'])->name('admin-users');
193 193
194 // кабинет - работодатели 194 // кабинет - работодатели
195 Route::get('employers', [EmployersController::class, 'index'])->name('employers'); 195 Route::get('employers', [EmployersController::class, 'index'])->name('employers');
196 196
197 Route::get('employers/comment/{employer}', [EmployersController::class, 'comment_read'])->name('comment-employer'); 197 Route::get('employers/comment/{employer}', [EmployersController::class, 'comment_read'])->name('comment-employer');
198 198
199 Route::get('flot/add/{employer}', [EmployersController::class, 'add_flot'])->name('flot_add'); 199 Route::get('flot/add/{employer}', [EmployersController::class, 'add_flot'])->name('flot_add');
200 Route::post('flot/add', [EmployersController::class, 'save_add_flot'])->name('flot_add_save'); 200 Route::post('flot/add', [EmployersController::class, 'save_add_flot'])->name('flot_add_save');
201 Route::get('flot/{flot}/{employer}', [EmployersController::class, 'edit_flot'])->name('flot'); 201 Route::get('flot/{flot}/{employer}', [EmployersController::class, 'edit_flot'])->name('flot');
202 Route::put('flot/{flot}', [EmployersController::class, 'edit_save_flot'])->name('flot_edit'); 202 Route::put('flot/{flot}', [EmployersController::class, 'edit_save_flot'])->name('flot_edit');
203 Route::get('flot/{flot}/{employer_id}/delete', [EmployersController::class, 'delete_flot'])->name('flot_delete'); 203 Route::get('flot/{flot}/{employer_id}/delete', [EmployersController::class, 'delete_flot'])->name('flot_delete');
204 204
205 // кабинет - соискатели 205 // кабинет - соискатели
206 Route::get('workers', [WorkersController::class, 'index'])->name('workers'); 206 Route::get('workers', [WorkersController::class, 'index'])->name('workers');
207 207
208 // кабинет - база данных 208 // кабинет - база данных
209 Route::get('basedata', [UsersController::class, 'index_bd'])->name('basedata'); 209 Route::get('basedata', [UsersController::class, 'index_bd'])->name('basedata');
210 Route::get('basedata/add', [UsersController::class, 'add_bd'])->name('add-basedata'); 210 Route::get('basedata/add', [UsersController::class, 'add_bd'])->name('add-basedata');
211 Route::post('basedata/add', [UsersController::class, 'add_store_bd'])->name('add-store-basedata'); 211 Route::post('basedata/add', [UsersController::class, 'add_store_bd'])->name('add-store-basedata');
212 Route::get('basedata/edit/{user}', [UsersController::class, 'edit_bd'])->name('edit-basedata'); 212 Route::get('basedata/edit/{user}', [UsersController::class, 'edit_bd'])->name('edit-basedata');
213 Route::put('basedata/edit/{user}', [UsersController::class, 'update_bd'])->name('update-basedata'); 213 Route::put('basedata/edit/{user}', [UsersController::class, 'update_bd'])->name('update-basedata');
214 Route::delete('basedata/delete/{user}', [UsersController::class, 'destroy_bd'])->name('delete-basedata'); 214 Route::delete('basedata/delete/{user}', [UsersController::class, 'destroy_bd'])->name('delete-basedata');
215 Route::get('basedata/doc/{user}', [UsersController::class, 'doc_bd'])->name('doc-basedata'); 215 Route::get('basedata/doc/{user}', [UsersController::class, 'doc_bd'])->name('doc-basedata');
216 216
217 // кабинет - вакансии 217 // кабинет - вакансии
218 Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers'); 218 Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers');
219 Route::get('ad-employers/add', [Ad_EmployersController::class, 'create'])->name('add-ad-employers'); 219 Route::get('ad-employers/add', [Ad_EmployersController::class, 'create'])->name('add-ad-employers');
220 Route::post('ad-employers/add', [Ad_EmployersController::class, 'store'])->name('store-ad-employers'); 220 Route::post('ad-employers/add', [Ad_EmployersController::class, 'store'])->name('store-ad-employers');
221 Route::get('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'edit'])->name('edit-ad-employers'); 221 Route::get('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'edit'])->name('edit-ad-employers');
222 Route::post('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'update'])->name('update-ad-employers'); 222 Route::post('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'update'])->name('update-ad-employers');
223 Route::delete('ad-employers/delete/{ad_employer}', [Ad_EmployersController::class, 'destroy'])->name('delete-ad-employer'); 223 Route::delete('ad-employers/delete/{ad_employer}', [Ad_EmployersController::class, 'destroy'])->name('delete-ad-employer');
224 224
225 // Редактирование должности в вакансии 225 // Редактирование должности в вакансии
226 Route::put('update-jobs/{ad_jobs}', [Ad_EmployersController::class, 'update_ad_jobs'])->name('update_jobs'); 226 Route::put('update-jobs/{ad_jobs}', [Ad_EmployersController::class, 'update_ad_jobs'])->name('update_jobs');
227 Route::get('edit-jobs/{ad_jobs}', [Ad_EmployersController::class, 'edit_jobs'])->name('edit_jobs'); 227 Route::get('edit-jobs/{ad_jobs}', [Ad_EmployersController::class, 'edit_jobs'])->name('edit_jobs');
228 228
229 229
230 // кабинет - категории 230 // кабинет - категории
231 //Route::get('categories', [AdminController::class, 'index'])->name('categories'); 231 //Route::get('categories', [AdminController::class, 'index'])->name('categories');
232 /* 232 /*
233 * CRUD-операции над Справочником Категории 233 * CRUD-операции над Справочником Категории
234 */ 234 */
235 Route::resource('categories', CategoryController::class, ['except' => ['show']]); 235 Route::resource('categories', CategoryController::class, ['except' => ['show']]);
236 236
237 // CRUD-операции над справочником Категории для работодателей 237 // CRUD-операции над справочником Категории для работодателей
238 Route::resource('category-emp', CategoryEmpController::class, ['except' => ['show']]); 238 Route::resource('category-emp', CategoryEmpController::class, ['except' => ['show']]);
239 239
240 // CRUD-операции над справочником Образование 240 // CRUD-операции над справочником Образование
241 Route::resource('education', EducationController::class, ['except' => ['show']]); 241 Route::resource('education', EducationController::class, ['except' => ['show']]);
242 242
243 Route::get('rename-program-education', [EducationController::class, 'rename_program'])->name('rename-program-education'); 243 Route::get('rename-program-education', [EducationController::class, 'rename_program'])->name('rename-program-education');
244 Route::get('program-education', [EducationController::class, 'add_program'])->name('add-program-education'); 244 Route::get('program-education', [EducationController::class, 'add_program'])->name('add-program-education');
245 Route::post('program-education', [EducationController::class, 'store_program'])->name('store-program-education'); 245 Route::post('program-education', [EducationController::class, 'store_program'])->name('store-program-education');
246 246
247 Route::get('program-education/edit/{program}/{education}', [EducationController::class, 'edit_program'])->name('edit-program-education'); 247 Route::get('program-education/edit/{program}/{education}', [EducationController::class, 'edit_program'])->name('edit-program-education');
248 Route::post('program-education/edit/{program}/{education}', [EducationController::class, 'update_program'])->name('update-program-education'); 248 Route::post('program-education/edit/{program}/{education}', [EducationController::class, 'update_program'])->name('update-program-education');
249 249
250 Route::get('program-education/delete/{program}/{education}', [EducationController::class, 'delete_program'])->name('delete-program-education'); 250 Route::get('program-education/delete/{program}/{education}', [EducationController::class, 'delete_program'])->name('delete-program-education');
251 251
252 //Route::get('job-titles', [AdminController::class, 'index'])->name('job-titles'); 252 //Route::get('job-titles', [AdminController::class, 'index'])->name('job-titles');
253 /* 253 /*
254 * кабинет - CRUD-операции по справочнику должности 254 * кабинет - CRUD-операции по справочнику должности
255 * 255 *
256 */ 256 */
257 Route::resource('job-titles', JobTitlesController::class, ['except' => ['show']]); 257 Route::resource('job-titles', JobTitlesController::class, ['except' => ['show']]);
258 258
259 // кабинет - сообщения (чтение чужих) 259 // кабинет - сообщения (чтение чужих)
260 Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages'); 260 Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages');
261 // кабинет - просмотр сообщения чужого (чтение) 261 // кабинет - просмотр сообщения чужого (чтение)
262 Route::get('messages/{message}', [MsgAnswersController::class, 'read_message'])->name('read-message'); 262 Route::get('messages/{message}', [MsgAnswersController::class, 'read_message'])->name('read-message');
263 263
264 // кабинет - сообщения (админские) 264 // кабинет - сообщения (админские)
265 Route::get('admin-messages', [MsgAnswersController::class, 'admin_messages'])->name('admin-messages'); 265 Route::get('admin-messages', [MsgAnswersController::class, 'admin_messages'])->name('admin-messages');
266 // кабинет - сообщения (админские) 266 // кабинет - сообщения (админские)
267 Route::post('admin-messages', [MsgAnswersController::class, 'admin_messages_post'])->name('admin-messages-post'); 267 Route::post('admin-messages', [MsgAnswersController::class, 'admin_messages_post'])->name('admin-messages-post');
268 // кабинет - sql - конструкция запросов 268 // кабинет - sql - конструкция запросов
269 Route::get('messages-sql', [MsgAnswersController::class, 'messages_sql'])->name('messages-sql'); 269 Route::get('messages-sql', [MsgAnswersController::class, 'messages_sql'])->name('messages-sql');
270 270
271 /* 271 /*
272 * Расписанный подход в описании каждой директорий групп пользователей. 272 * Расписанный подход в описании каждой директорий групп пользователей.
273 */ 273 */
274 // кабинет - группы пользователей 274 // кабинет - группы пользователей
275 Route::get('groups', [GroupsController::class, 'index'])->name('groups'); 275 Route::get('groups', [GroupsController::class, 'index'])->name('groups');
276 // кабинет - добавление форма группы пользователей 276 // кабинет - добавление форма группы пользователей
277 Route::get('groups/add', [GroupsController::class, 'add'])->name('add-group'); 277 Route::get('groups/add', [GroupsController::class, 'add'])->name('add-group');
278 // кабинет - сохранение формы группы пользователей 278 // кабинет - сохранение формы группы пользователей
279 Route::post('groups/add', [GroupsController::class, 'store'])->name('add-group-store'); 279 Route::post('groups/add', [GroupsController::class, 'store'])->name('add-group-store');
280 // кабинет - редактирование форма группы пользователей 280 // кабинет - редактирование форма группы пользователей
281 Route::get('groups/edit/{group}', [GroupsController::class, 'edit'])->name('edit-group'); 281 Route::get('groups/edit/{group}', [GroupsController::class, 'edit'])->name('edit-group');
282 // кабинет - сохранение редактированной формы группы пользователей 282 // кабинет - сохранение редактированной формы группы пользователей
283 Route::post('groups/edit/{group}', [GroupsController::class, 'update'])->name('update-group'); 283 Route::post('groups/edit/{group}', [GroupsController::class, 'update'])->name('update-group');
284 // кабинет - удаление группы пользователей 284 // кабинет - удаление группы пользователей
285 Route::delete('groups/delete/{group}', [GroupsController::class, 'destroy'])->name('delete-group'); 285 Route::delete('groups/delete/{group}', [GroupsController::class, 'destroy'])->name('delete-group');
286 286
287 287
288 // кабинет - список админов 288 // кабинет - список админов
289 Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin'); 289 Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin');
290 290
291 291
292 /////редактор////// кабинет - редактор сайта//////////////////////// 292 /////редактор////// кабинет - редактор сайта////////////////////////
293 Route::get('editor-site', function() { 293 Route::get('editor-site', function() {
294 return view('admin.editor.index'); 294 return view('admin.editor.index');
295 })->name('editor-site'); 295 })->name('editor-site');
296 296
297 297
298 // кабинет - редактор шапки-футера сайта 298 // кабинет - редактор шапки-футера сайта
299 Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks'); 299 Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks');
300 Route::get('edit-bloks/add', [CompanyController::class, 'editblock_add'])->name('add-block'); 300 Route::get('edit-bloks/add', [CompanyController::class, 'editblock_add'])->name('add-block');
301 Route::post('edit-bloks/add', [CompanyController::class, 'editblock_store'])->name('add-block-store'); 301 Route::post('edit-bloks/add', [CompanyController::class, 'editblock_store'])->name('add-block-store');
302 Route::get('edit-bloks/ajax', [CompanyController::class, 'editblock_ajax'])->name('ajax.block'); 302 Route::get('edit-bloks/ajax', [CompanyController::class, 'editblock_ajax'])->name('ajax.block');
303 Route::get('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_edit'])->name('edit-block'); 303 Route::get('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_edit'])->name('edit-block');
304 Route::put('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_update'])->name('update-block'); 304 Route::put('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_update'])->name('update-block');
305 Route::delete('edit-bloks/delete/{block}', [CompanyController::class, 'editblock_destroy'])->name('delete-block'); 305 Route::delete('edit-bloks/delete/{block}', [CompanyController::class, 'editblock_destroy'])->name('delete-block');
306 306
307 307
308 // кабинет - редактор должности на главной 308 // кабинет - редактор должности на главной
309 Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main'); 309 Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main');
310 310
311 // кабинет - редактор работодатели на главной 311 // кабинет - редактор работодатели на главной
312 Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main'); 312 Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main');
313 313
314 314
315 // кабинет - редактор seo-сайта 315 // кабинет - редактор seo-сайта
316 Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo'); 316 Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo');
317 Route::get('editor-seo/add', [CompanyController::class, 'editor_seo_add'])->name('add-seo'); 317 Route::get('editor-seo/add', [CompanyController::class, 'editor_seo_add'])->name('add-seo');
318 Route::post('editor-seo/add', [CompanyController::class, 'editor_seo_store'])->name('add-seo-store'); 318 Route::post('editor-seo/add', [CompanyController::class, 'editor_seo_store'])->name('add-seo-store');
319 Route::get('editor-seo/ajax', [CompanyController::class, 'editor_seo_ajax'])->name('ajax.seo'); 319 Route::get('editor-seo/ajax', [CompanyController::class, 'editor_seo_ajax'])->name('ajax.seo');
320 Route::get('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_edit'])->name('edit-seo'); 320 Route::get('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_edit'])->name('edit-seo');
321 Route::put('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_update'])->name('update-seo'); 321 Route::put('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_update'])->name('update-seo');
322 Route::delete('editor-seo/delete/{page}', [CompanyController::class, 'editor_seo_destroy'])->name('delete-seo'); 322 Route::delete('editor-seo/delete/{page}', [CompanyController::class, 'editor_seo_destroy'])->name('delete-seo');
323 323
324 324
325 // кабинет - редактор страниц 325 // кабинет - редактор страниц
326 Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages'); 326 Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages');
327 // кабинет - добавление страницы 327 // кабинет - добавление страницы
328 Route::get('editor-pages/add', [CompanyController::class, 'editor_pages_add'])->name('add-page'); 328 Route::get('editor-pages/add', [CompanyController::class, 'editor_pages_add'])->name('add-page');
329 // кабинет - сохранение формы страницы 329 // кабинет - сохранение формы страницы
330 Route::post('editor-page/add', [CompanyController::class, 'editor_pages_store'])->name('add-page-store'); 330 Route::post('editor-page/add', [CompanyController::class, 'editor_pages_store'])->name('add-page-store');
331 // кабинет - редактирование форма страницы 331 // кабинет - редактирование форма страницы
332 Route::get('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_edit'])->name('edit-page'); 332 Route::get('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_edit'])->name('edit-page');
333 // кабинет - сохранение редактированной формы страницы 333 // кабинет - сохранение редактированной формы страницы
334 Route::put('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_update'])->name('update-page'); 334 Route::put('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_update'])->name('update-page');
335 // кабинет - удаление страницы 335 // кабинет - удаление страницы
336 Route::delete('editor-pages/delete/{page}', [CompanyController::class, 'editor_pages_destroy'])->name('delete-page'); 336 Route::delete('editor-pages/delete/{page}', [CompanyController::class, 'editor_pages_destroy'])->name('delete-page');
337 337
338 338
339 // кабинет - реклама сайта 339 // кабинет - реклама сайта
340 Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames'); 340 Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames');
341 Route::get('reclames/add', [CompanyController::class, 'reclames_add'])->name('add-reclames'); 341 Route::get('reclames/add', [CompanyController::class, 'reclames_add'])->name('add-reclames');
342 Route::post('reclames/add', [CompanyController::class, 'reclames_store'])->name('add-reclames-store'); 342 Route::post('reclames/add', [CompanyController::class, 'reclames_store'])->name('add-reclames-store');
343 Route::get('reclames/edit/{reclame}', [CompanyController::class, 'reclames_edit'])->name('edit-reclames'); 343 Route::get('reclames/edit/{reclame}', [CompanyController::class, 'reclames_edit'])->name('edit-reclames');
344 Route::put('reclames/edit/{reclame}', [CompanyController::class, 'reclames_update'])->name('update-reclames'); 344 Route::put('reclames/edit/{reclame}', [CompanyController::class, 'reclames_update'])->name('update-reclames');
345 Route::delete('reclames/delete/{reclame}', [CompanyController::class, 'reclames_destroy'])->name('delete-reclames'); 345 Route::delete('reclames/delete/{reclame}', [CompanyController::class, 'reclames_destroy'])->name('delete-reclames');
346 //////////////////////////////////////////////////////////////////////// 346 ////////////////////////////////////////////////////////////////////////
347 347
348 348
349 // кабинет - отзывы о работодателе для модерации 349 // кабинет - отзывы о работодателе для модерации
350 Route::get('answers', [EmployersController::class, 'answers'])->name('answers'); 350 Route::get('answers', [EmployersController::class, 'answers'])->name('answers');
351 351
352 // Общая страница статистики 352 // Общая страница статистики
353 Route::get('statics', function () { 353 Route::get('statics', function () {
354 return view('admin.static.index'); 354 return view('admin.static.index');
355 })->name('statics'); 355 })->name('statics');
356 356
357 // кабинет - статистика работников 357 // кабинет - статистика работников
358 Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers'); 358 Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers');
359 359
360 // кабинет - статистика вакансий работодателя 360 // кабинет - статистика вакансий работодателя
361 Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads'); 361 Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads');
362 362
363 // кабинет - справочник - блоки информации (дипломы и документы) для резюме работника 363 // кабинет - справочник - блоки информации (дипломы и документы) для резюме работника
364 /* 364 /*
365 * CRUD-операции над справочником дипломы и документы 365 * CRUD-операции над справочником дипломы и документы
366 */ 366 */
367 //Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks'); 367 //Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks');
368 Route::resource('infobloks', InfoBloksController::class, ['except' => ['show']]); 368 Route::resource('infobloks', InfoBloksController::class, ['except' => ['show']]);
369 369
370 // кабинет - роли пользователя 370 // кабинет - роли пользователя
371 Route::get('roles', [UsersController::class, 'roles'])->name('roles'); 371 Route::get('roles', [UsersController::class, 'roles'])->name('roles');
372 372
373 Route::get('admin_roles', [UsersController::class, 'admin_roles'])->name('admin_roles'); 373 Route::get('admin_roles', [UsersController::class, 'admin_roles'])->name('admin_roles');
374 374
375 Route::get('logs', function() { 375 Route::get('logs', function() {
376 $files = Storage::files('logs/laravel.log'); 376 $files = Storage::files('logs/laravel.log');
377 })->name('logs'); 377 })->name('logs');
378 }); 378 });
379 379
380 // Инструментальные страницы 380 // Инструментальные страницы
381 Route::post('ckeditor/upload', [CKEditorController::class, 'upload'])->name('ckeditor.image-upload'); 381 Route::post('ckeditor/upload', [CKEditorController::class, 'upload'])->name('ckeditor.image-upload');
382 382
383 Route::get('redis/', [PagesController::class, 'redis'])->name('redis'); 383 Route::get('redis/', [PagesController::class, 'redis'])->name('redis');
384 384
385 Route::get('excel/', [PagesController::class, 'excel'])->name('excel'); 385 Route::get('excel/', [PagesController::class, 'excel'])->name('excel');
386 386
387 // Страницы с произвольным контентом 387 // Страницы с произвольным контентом
388 Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page'); 388 Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page');
389 389
390 // Публичные страницы соискателя 390 // Публичные страницы соискателя
391 Route::get('workers/profile/{worker}', [WorkerController::class, 'profile'])->name('worker_page'); 391 Route::get('workers/profile/{worker}', [WorkerController::class, 'profile'])->name('worker_page');
392 392
393 //Страница вакансии 393 //Страница вакансии
394 Route::get('employer/ad/{ad_employer}', [AdEmployerController::class, 'ad_employer'])->name('ad-employer'); 394 Route::get('employer/ad/{ad_employer}', [AdEmployerController::class, 'ad_employer'])->name('ad-employer');
395 395
396 //Вакансии 396 //Вакансии
397 Route::get('vacancies', [MainController::class, 'vacancies'])->name('vacancies'); 397 Route::get('vacancies', [MainController::class, 'vacancies'])->name('vacancies');
398 398
399 //Вакансии поиск на главной 399 //Вакансии поиск на главной
400 Route::get('search-vacancies', [MainController::class, 'search_vacancies'])->name('search_vacancies'); 400 Route::get('search-vacancies', [MainController::class, 'search_vacancies'])->name('search_vacancies');
401 401
402 //Вакансии категория детальная 402 //Вакансии категория детальная
403 Route::get('list-vacancies/{categories}', [MainController::class, 'list_vacancies'])->name('list-vacancies'); 403 Route::get('list-vacancies/{categories}', [MainController::class, 'list_vacancies'])->name('list-vacancies');
404 404
405 //Детальная страница вакансии - работодателя 405 //Детальная страница вакансии - работодателя
406 Route::get('vacancie/{vacancy}', [FrontEmployersController::class, 'vacancie'])->name('vacancie'); 406 Route::get('vacancie/{vacancy}', [FrontEmployersController::class, 'vacancie'])->name('vacancie');
407 407
408 //Судоходные компании 408 //Судоходные компании
409 Route::get('shipping-companies', [FrontCompanyController::class, 'shipping_companies'])->name('shipping_companies'); 409 Route::get('shipping-companies', [FrontCompanyController::class, 'shipping_companies'])->name('shipping_companies');
410 410
411 //Детальная инфа о компании 411 //Детальная инфа о компании
412 Route::get('info-company/{company}', [FrontCompanyController::class, 'info_company'])->name('info_company'); 412 Route::get('info-company/{company}', [FrontCompanyController::class, 'info_company'])->name('info_company');
413 413
414 //Образование 414 //Образование
415 Route::get('education', [MainController::class, 'education'])->name('education'); 415 Route::get('education', [MainController::class, 'education'])->name('education');
416 416
417 //Новости 417 //Новости
418 Route::get('news', [MainController::class, 'news'])->name('news'); 418 Route::get('news', [MainController::class, 'news'])->name('news');
419 419
420 //Контакты 420 //Контакты
421 Route::get('contacts', [MainController::class, 'contacts'])->name('contacts'); 421 Route::get('contacts', [MainController::class, 'contacts'])->name('contacts');
422 422
423 //База резюме 423 //База резюме
424 Route::get('bd-resume', [WorkerController::class, 'bd_resume'])->name('bd_resume'); 424 Route::get('bd-resume', [WorkerController::class, 'bd_resume'])->name('bd_resume');
425 425
426 //Анкета соискателя 426 //Анкета соискателя
427 Route::get('resume-profile/{worker}', [WorkerController::class, 'resume_profile'])->name('resume_profile'); 427 Route::get('resume-profile/{worker}', [WorkerController::class, 'resume_profile'])->name('resume_profile');
428 428
429 //Скачать резюме 429 //Скачать резюме
430 Route::get('resume-download/{worker}', [WorkerController::class, 'resume_download'])->name('resume_download'); 430 Route::get('resume-download/{worker}', [WorkerController::class, 'resume_download'])->name('resume_download');
431 431
432 //Вход в кабинет 432 //Вход в кабинет
433 Route::get('login', [MainController::class, 'input_login'])->name('login'); 433 Route::get('login', [MainController::class, 'input_login'])->name('login');
434 434
435 // Выход из кабинета 435 // Выход из кабинета
436 Route::get('logout', [EmployerController::class, 'logout'])->name('logout'); 436 Route::get('logout', [EmployerController::class, 'logout'])->name('logout');
437 437
438 // Регистрация соискателя
439 Route::get('register-worker', [WorkerController::class, 'register_worker'])->name('register_worker');
440
441
438 // Личный кабинет работника 442 // Личный кабинет работника
439 Route::group([ 443 Route::group([
440 'as' => 'worker.', // имя маршрута, например auth.index 444 'as' => 'worker.', // имя маршрута, например auth.index
441 'prefix' => 'worker', // префикс маршрута, например auth/index 445 'prefix' => 'worker', // префикс маршрута, например auth/index
442 'middleware' => ['auth'], ['is_worker'], 446 'middleware' => ['auth'], ['is_worker'],
443 ], function() { 447 ], function() {
444 // 1 страница - Моя анкета 448 // 1 страница - Моя анкета
445 Route::get('cabinet', [WorkerController::class, 'cabinet'])->name('cabinet'); 449 Route::get('cabinet', [WorkerController::class, 'cabinet'])->name('cabinet');
446 Route::get('cabinet/{worker}', [WorkerController::class, 'cabinet_save'])->name('cabinet_save'); 450 Route::get('cabinet/{worker}', [WorkerController::class, 'cabinet_save'])->name('cabinet_save');
447 451
448 // 2 страница - Сообщения 452 // 2 страница - Сообщения
449 Route::get('cabinet/messages/{type_message}', [WorkerController::class, 'messages'])->name('messages'); 453 Route::get('cabinet/messages/{type_message}', [WorkerController::class, 'messages'])->name('messages');
450 454
451 // 3 страница - Избранные вакансии 455 // 3 страница - Избранные вакансии
452 Route::get('cabinet/favorite', [WorkerController::class, 'favorite'])->name('favorite'); 456 Route::get('cabinet/favorite', [WorkerController::class, 'favorite'])->name('favorite');
453 457
454 // 4 страница - Сменить пароль 458 // 4 страница - Сменить пароль
455 Route::get('cabinet/new_password', [WorkerController::class, 'new_password'])->name('new_password'); 459 Route::get('cabinet/new_password', [WorkerController::class, 'new_password'])->name('new_password');
456 460
457 // 5 страница - Удалить профиль 461 // 5 страница - Удалить профиль
458 Route::get('cabinet/delete_profile', [WorkerController::class, 'delete_profile'])->name('delete_profile'); 462 Route::get('cabinet/delete_profile', [WorkerController::class, 'delete_profile'])->name('delete_profile');
459 463
460 // 6 страница - Выход 464 // 6 страница - Выход
461
462 }); 465 });
463 466
464 // Личный кабинет работодателя 467 // Личный кабинет работодателя
465 Route::group([ 468 Route::group([
466 'as' => 'employer.', // имя маршрута, например auth.index 469 'as' => 'employer.', // имя маршрута, например auth.index
467 'prefix' => 'employer', // префикс маршрута, например auth/index 470 'prefix' => 'employer', // префикс маршрута, например auth/index
468 'middleware' => ['auth'], !['is_worker'], 471 'middleware' => ['auth'], !['is_worker'],
469 ], function() { 472 ], function() {
470 // 1 страница - Профиль 473 // 1 страница - Профиль
471 Route::get('cabinet', [EmployerController::class, 'cabinet'])->name('cabinet'); 474 Route::get('cabinet', [EmployerController::class, 'cabinet'])->name('cabinet');
472 Route::post('cabinet/{Employer}', [EmployerController::class, 'cabinet_save'])->name('cabinet_save'); 475 Route::post('cabinet/{Employer}', [EmployerController::class, 'cabinet_save'])->name('cabinet_save');
473 Route::post('flot_add_ajax', [EmployerController::class, 'save_add_flot'])->name('save_add_flot'); 476 Route::post('flot_add_ajax', [EmployerController::class, 'save_add_flot'])->name('save_add_flot');
474 Route::get('flot_delete_ajax/{Flot}', [EmployerController::class, 'delete_flot'])->name('delete_flot'); 477 Route::get('flot_delete_ajax/{Flot}', [EmployerController::class, 'delete_flot'])->name('delete_flot');
475 478
476 // 2 страница - Добавление вакансий 479 // 2 страница - Добавление вакансий
477 Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie'); 480 Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie');
478 Route::post('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancy_save'])->name('vacancy_save'); 481 Route::post('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancy_save'])->name('vacancy_save');
479 Route::post('vacancie', [EmployerController::class, 'cabinet_vacancy_save1'])->name('vac_save'); 482 Route::post('vacancie', [EmployerController::class, 'cabinet_vacancy_save1'])->name('vac_save');
480 483
481 // 3 страница - Мои вакансии 484 // 3 страница - Мои вакансии
482 Route::get('cabinet/vacancy_list', [EmployerController::class, 'vacancy_list'])->name('vacancy_list'); 485 Route::get('cabinet/vacancy_list', [EmployerController::class, 'vacancy_list'])->name('vacancy_list');
483 Route::get('cabinet/vacancy/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); 486 Route::get('cabinet/vacancy/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit');
484 Route::get('cabinet/vacancy-delete/{ad_employer}', [EmployerController::class, 'vacancy_delete'])->name('vacancy_delete'); 487 Route::get('cabinet/vacancy-delete/{ad_employer}', [EmployerController::class, 'vacancy_delete'])->name('vacancy_delete');
485 Route::get('cabinet/vacancy-up/{ad_employer}', [EmployerController::class, 'vacancy_up'])->name('vacancy_up'); 488 Route::get('cabinet/vacancy-up/{ad_employer}', [EmployerController::class, 'vacancy_up'])->name('vacancy_up');
486 Route::get('cabinet/vacancy-eye/{ad_employer}/{status}', [EmployerController::class, 'vacancy_eye'])->name('vacancy_eye'); 489 Route::get('cabinet/vacancy-eye/{ad_employer}/{status}', [EmployerController::class, 'vacancy_eye'])->name('vacancy_eye');
487 Route::get('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); 490 Route::get('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit');
488 491
489 // 4 страница - Отклики на вакансии 492 // 4 страница - Отклики на вакансии
490 Route::get('cabinet/answers/{employer}', [EmployerController::class, 'answers'])->name('answers'); 493 Route::get('cabinet/answers/{employer}', [EmployerController::class, 'answers'])->name('answers');
491 Route::get('cabinet/status/{employer}', [EmployerController::class, 'supple_status2'])->name('supple'); 494 Route::get('cabinet/status/{employer}', [EmployerController::class, 'supple_status2'])->name('supple');
492 Route::get('status/{employer}/{ad_response}/{flag}', [EmployerController::class, 'supple_status'])->name('status_msg'); 495 Route::get('status/{employer}/{ad_response}/{flag}', [EmployerController::class, 'supple_status'])->name('status_msg');
493 496
494 // 5 страница - Сообщения 497 // 5 страница - Сообщения
495 Route::get('cabinet/messages/{type_message}', [EmployerController::class, 'messages'])->name('messages'); 498 Route::get('cabinet/messages/{type_message}', [EmployerController::class, 'messages'])->name('messages');
496 Route::get('cabinet/dialog/{user1}/{user2}', [EmployerController::class, 'dialog'])->name('dialog'); 499 Route::get('cabinet/dialog/{user1}/{user2}', [EmployerController::class, 'dialog'])->name('dialog');
497 Route::post('cabinet/send-message', [EmployerController::class, 'send_message'])->name('send_message'); 500 Route::post('cabinet/send-message', [EmployerController::class, 'send_message'])->name('send_message');
498 Route::post('test123', [EmployerController::class, 'test123'])->name('test123'); 501 Route::post('test123', [EmployerController::class, 'test123'])->name('test123');
499 502
500 // 6 страница - Избранный 503 // 6 страница - Избранный
501 Route::get('cabinet/favorites', [EmployerController::class, 'favorites'])->name('favorites'); 504 Route::get('cabinet/favorites', [EmployerController::class, 'favorites'])->name('favorites');
502 505
503 //7 страница - База данных 506 //7 страница - База данных
504 Route::get('cabinet/bd', [EmployerController::class, 'bd'])->name('bd'); 507 Route::get('cabinet/bd', [EmployerController::class, 'bd'])->name('bd');
505 508
506 //8 страница - База резюме 509 //8 страница - База резюме
507 Route::get('cabinet/bd-tupe', [EmployerController::class, 'bd_tupe'])->name('bd-tupe'); 510 Route::get('cabinet/bd-tupe', [EmployerController::class, 'bd_tupe'])->name('bd-tupe');
508 511
509 // 9 рассылка сообщений 512 // 9 рассылка сообщений
510 Route::get('cabinet/send-all-messages', [EmployerController::class, 'send_all_messages'])->name('send_all_messages'); 513 Route::get('cabinet/send-all-messages', [EmployerController::class, 'send_all_messages'])->name('send_all_messages');
511 Route::post('cabinet/send-all-messages/send', [EmployerController::class, 'send_all_post'])->name('send_all_post'); 514 Route::post('cabinet/send-all-messages/send', [EmployerController::class, 'send_all_post'])->name('send_all_post');
512 515
513 // 10 страница FAQ вопросы 516 // 10 страница FAQ вопросы
514 Route::get('cabinet/faq', [EmployerController::class, 'faq'])->name('faq'); 517 Route::get('cabinet/faq', [EmployerController::class, 'faq'])->name('faq');
515 518
516 // 11 страница - Настройка уведомлений 519 // 11 страница - Настройка уведомлений
517 Route::get('cabinet/subscribe', [EmployerController::class, 'subscribe'])->name('subscribe'); 520 Route::get('cabinet/subscribe', [EmployerController::class, 'subscribe'])->name('subscribe');
518 Route::get('cabinet/subscribe/save', [EmployerController::class, 'save_subscribe'])->name('save_subscribe'); 521 Route::get('cabinet/subscribe/save', [EmployerController::class, 'save_subscribe'])->name('save_subscribe');
519 522
520 // 12 страница - Сменить пароль 523 // 12 страница - Сменить пароль
521 Route::get('cabinet/password-reset', [EmployerController::class, 'password_reset'])->name('password_reset'); 524 Route::get('cabinet/password-reset', [EmployerController::class, 'password_reset'])->name('password_reset');
522 Route::get('cabinet/password-reset/new', [EmployerController::class, 'new_password'])->name('new_password'); 525 Route::get('cabinet/password-reset/new', [EmployerController::class, 'new_password'])->name('new_password');
523 526
524 // 13 страница - Удаление профиля 527 // 13 страница - Удаление профиля
525 Route::get('cabinet/delete-people', [EmployerController::class, 'delete_people'])->name('delete_people'); 528 Route::get('cabinet/delete-people', [EmployerController::class, 'delete_people'])->name('delete_people');
526 Route::get('cabinet/action-delete-people', [EmployerController::class, 'action_delete_user'])->name('action_delete_user'); 529 Route::get('cabinet/action-delete-people', [EmployerController::class, 'action_delete_user'])->name('action_delete_user');
527 }); 530 });