web.php
39.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
<?php
use App\Http\Controllers\Ad_jobsController;
use App\Http\Controllers\AdEmployerController;
use App\Http\Controllers\Admin\AdminController;
use App\Http\Controllers\Admin\CategoryController;
use App\Http\Controllers\Admin\CategoryEmpController;
use App\Http\Controllers\Admin\EducationController;
use App\Http\Controllers\EducationController as EducationFrontController;
use App\Http\Controllers\Admin\EmployersController;
use App\Http\Controllers\EmployerController as FrontEmployersController;
use App\Http\Controllers\Admin\InfoBloksController;
use App\Http\Controllers\Admin\JobTitlesController;
use App\Http\Controllers\Admin\UsersController;
use App\Http\Controllers\Admin\WorkersController;
use App\Http\Controllers\Auth\ForgotPasswordController;
use App\Http\Controllers\Auth\LoginController;
use App\Http\Controllers\Auth\RegisterController;
use App\Http\Controllers\CKEditorController;
use App\Http\Controllers\MediaController;
use App\Http\Controllers\WorkerController;
use App\Models\Ad_jobs;
use App\Models\User;
use App\Http\Controllers\MainController;
use App\Http\Controllers\HomeController;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Admin\CompanyController;
use App\Http\Controllers\Admin\Ad_EmployersController;
use App\Http\Controllers\Admin\MsgAnswersController;
use App\Http\Controllers\Admin\GroupsController;
use App\Http\Controllers\PagesController;
use Illuminate\Support\Facades\Storage;
use App\Http\Controllers\EmployerController;
use App\Http\Controllers\CompanyController as FrontCompanyController;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
/*
Route::get('/', function () {
return view('welcome');
})->name('index');
*/
Route::get('/', [MainController::class, 'index'])->name('index');
//Роуты авторизации, регистрации, восстановления, аутентификации
Auth::routes(['verify' => true]);
// роуты регистрации, авторизации, восстановления пароля, верификации почты
/*Route::group([
'as' => 'auth.', //имя маршрута, например auth.index
'prefix' => 'auth', // префикс маршрута, например, auth/index
], function () {
//форма регистрации
Route::get('register', [RegisterController::class, 'register'])->name('register');
//создание пользователя
Route::post('register', [RegisterController::class, 'create'])->name('create');
//форма входа авторизации
Route::get('login', [LoginController::class, 'login'])->name('login');
//аутентификация
Route::post('login', [LoginController::class, 'authenticate'])->name('auth');
//выход
Route::get('logout', [LoginController::class, 'logout'])->name('logout');
//форма ввода адреса почты
Route::get('forgot-password', [ForgotPasswordController::class, 'form'])->name('forgot-form');
//письмо на почту
Route::post('forgot-password', [ForgotPasswordController::class, 'mail'])->name('forgot-mail');
//форма восстановления пароля
Route::get('reset-password/token/{token}/email/{email}',
[ResetPasswordController::class, 'form']
)->name('reset-form');
//восстановление пароля
Route::post('reset-password',
[ResetPasswordController::class, 'reset']
)->name('reset-password');
//сообщение о необходимости проверки адреса почты
Route::get('verify-message', [VerifyEmailController::class, 'message'])->name('verify-message');
//подтверждение адреса почты нового пользователя
Route::get('verify-email/token/{token}/id/{id}', [VerifyEmailController::class, 'verify'])
->where('token', '[a-f0-9]{32}')
->where('id', '[0-9]+')
->name('verify-email');
});*/
//Личный кабинет пользователя
Route::get('/home', [HomeController::class, 'index'])->name('home');
/*
Route::post('resend/verification-email', function (\Illuminate\Http\Request $request) {
$user = User::where('email',$request->input('email'))->first();
$user->sendEmailVerificationNotification();
return 'your response';
})->middleware('throttle:6,1')->name('verification.resend');
*/
// Авторизация, регистрация в админку
Route::group([
'as' => 'admin.', // имя маршрута, например auth.index
'prefix' => 'admin', // префикс маршрута, например auth/index
'middleware' => ['guest'],
], function () {
// Форма регистрации
Route::get('register', [AdminController::class, 'register'])->name('register');
// Создание пользователя
Route::post('register', [AdminController::class, 'create'])->name('create');
//Форма входа
Route::get('login', [AdminController::class, 'login'])->name('login');
// аутентификация
Route::post('login', [AdminController::class, 'autenticate'])->name('auth');
});
// Личный кабинет админки
Route::group([
'as' => 'admin.', // имя маршрута, например auth.index
'prefix' => 'admin', // префикс маршрута, например auth/index
'middleware' => ['auth'], ['admin'],
], function() {
// выход
Route::get('logout', [AdminController::class, 'logout'])->name('logout');
// кабинет главная страница
Route::get('cabinet', [AdminController::class, 'index'])->name('index');
// кабинет профиль админа - форма
Route::get('profile', [AdminController::class, 'profile'])->name('profile');
// кабинет профиль админа - сохранение формы
Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile');
//кабинет сообщения админа
//Route::get('messages', [AdminController::class, 'profile'])->name('profile');
// кабинет профиль - форма пароли
Route::get('password', [AdminController::class, 'profile_password'])->name('password');
// кабинет профиль - сохранение формы пароля
Route::post('password', [AdminController::class, 'profile_password_new'])->name('password');
// кабинет профиль пользователя - форма
Route::get('user-profile/{user}', [AdminController::class, 'profile_user'])->name('user-profile');
// кабинет профиль пользователя - сохранение формы
Route::post('user-profile/{user}', [AdminController::class, 'store_profile_user'])->name('user-store_profile');
// кабинет профиль работодатель - форма
Route::get('employer-profile/{employer}', [EmployersController::class, 'form_update_employer'])->name('employer-profile');
// кабинет профиль работодатель - сохранение формы
Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile');
// кабинет удаление профиль работодателя и юзера
Route::delete('employers/delete/{employer}/{user}', [EmployersController::class, 'delete_employer'])->name('delete-employer');
// кабинет профиль работник - форма
Route::get('worker-profile/add/{user}', [WorkersController::class, 'form_add_worker'])->name('worker-profile-add');
Route::post('worker-profile/add/{user}', [WorkersController::class, 'form_store_worker'])->name('worker-profile-store');
Route::get('worker-profile/{worker}', [WorkersController::class, 'form_edit_worker'])->name('worker-profile-edit');
// кабинет профиль работник - сохранение формы
Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile-update');
// Медиа
Route::get('media', [MediaController::class, 'index'])->name('media');
Route::delete('media/{media}', [MediaController::class, 'delete'])->name('delete-media');
// кабинет настройки сайта - форма
Route::get('config', [AdminController::class, 'config_form'])->name('config');
// кабинет настройки сайта сохранение формы
Route::post('config', [AdminController::class, 'store_config'])->name('store_config');
// кабинет - новости
Route::get('news-list', [AdminController::class, 'news_admin'])->name('news_admin');
Route::get('news/add', [AdminController::class, 'new_admin_add'])->name('new_admin_add');
Route::post('news/add', [AdminController::class, 'new_admin_add_save'])->name('new_admin_save_add');
Route::get('news/edit/{new}', [AdminController::class, 'new_admin_edit'])->name('new_admin_edit');
Route::post('news/edit/{new}', [AdminController::class, 'new_admin_update_save'])->name('new_admin_update');
Route::get('news/delete/{new}', [AdminController::class, 'new_admin_delete'])->name('new_admin_delete');
// кабинет - пользователи
Route::get('users', [UsersController::class, 'index'])->name('users');
Route::get('user-delete/{user}', [UsersController::class, 'user_delete'])->name('user_delete');
// кабинет - пользователи
Route::get('admin-users', [AdminController::class, 'index_admin'])->name('admin-users');
// кабинет - работодатели
Route::get('employers', [EmployersController::class, 'index'])->name('employers');
Route::get('employers/comment/{employer}', [EmployersController::class, 'comment_read'])->name('comment-employer');
Route::get('flot/add/{employer}', [EmployersController::class, 'add_flot'])->name('flot_add');
Route::post('flot/add', [EmployersController::class, 'save_add_flot'])->name('flot_add_save');
Route::get('flot/{flot}/{employer}', [EmployersController::class, 'edit_flot'])->name('flot');
Route::put('flot/{flot}', [EmployersController::class, 'edit_save_flot'])->name('flot_edit');
Route::get('flot/{flot}/{employer_id}/delete', [EmployersController::class, 'delete_flot'])->name('flot_delete');
// кабинет - соискатели
Route::get('workers', [WorkersController::class, 'index'])->name('workers');
// кабинет - база данных
Route::get('basedata', [UsersController::class, 'index_bd'])->name('basedata');
Route::get('basedata/add', [UsersController::class, 'add_bd'])->name('add-basedata');
Route::post('basedata/add', [UsersController::class, 'add_store_bd'])->name('add-store-basedata');
Route::get('basedata/edit/{user}', [UsersController::class, 'edit_bd'])->name('edit-basedata');
Route::put('basedata/edit/{user}', [UsersController::class, 'update_bd'])->name('update-basedata');
Route::delete('basedata/delete/{user}', [UsersController::class, 'destroy_bd'])->name('delete-basedata');
Route::get('basedata/doc/{user}', [UsersController::class, 'doc_bd'])->name('doc-basedata');
// кабинет - вакансии
Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers');
Route::get('ad-employers/add', [Ad_EmployersController::class, 'create'])->name('add-ad-employers');
Route::post('ad-employers/add', [Ad_EmployersController::class, 'store'])->name('store-ad-employers');
Route::get('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'edit'])->name('edit-ad-employers');
Route::post('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'update'])->name('update-ad-employers');
Route::delete('ad-employers/delete/{ad_employer}', [Ad_EmployersController::class, 'destroy'])->name('delete-ad-employer');
// Редактирование должности в вакансии
Route::put('update-jobs/{ad_jobs}', [Ad_EmployersController::class, 'update_ad_jobs'])->name('update_jobs');
Route::get('edit-jobs/{ad_jobs}', [Ad_EmployersController::class, 'edit_jobs'])->name('edit_jobs');
// кабинет - категории
//Route::get('categories', [AdminController::class, 'index'])->name('categories');
// СRUD-операции над Справочником Категории
Route::resource('categories', CategoryController::class, ['except' => ['show']]);
// CRUD-операции над справочником Категории для работодателей
Route::resource('category-emp', CategoryEmpController::class, ['except' => ['show']]);
// CRUD-операции над справочником Образование
Route::resource('education', EducationController::class, ['except' => ['show']]);
Route::get('rename-program-education', [EducationController::class, 'rename_program'])->name('rename-program-education');
Route::get('program-education', [EducationController::class, 'add_program'])->name('add-program-education');
Route::post('program-education', [EducationController::class, 'store_program'])->name('store-program-education');
Route::get('program-education/edit/{program}/{education}', [EducationController::class, 'edit_program'])->name('edit-program-education');
Route::post('program-education/edit/{program}/{education}', [EducationController::class, 'update_program'])->name('update-program-education');
Route::get('program-education/delete/{program}/{education}', [EducationController::class, 'delete_program'])->name('delete-program-education');
//Route::get('job-titles', [AdminController::class, 'index'])->name('job-titles');
/*
* кабинет - CRUD-операции по справочнику должности
*
*/
Route::resource('job-titles', JobTitlesController::class, ['except' => ['show']]);
// кабинет - сообщения (чтение чужих)
Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages');
// кабинет - просмотр сообщения чужого (чтение)
Route::get('messages/{message}', [MsgAnswersController::class, 'read_message'])->name('read-message');
// кабинет - сообщения (админские)
Route::get('admin-messages', [MsgAnswersController::class, 'admin_messages'])->name('admin-messages');
// кабинет - сообщения (админские)
Route::post('admin-messages', [MsgAnswersController::class, 'admin_messages_post'])->name('admin-messages-post');
// кабинет - sql - конструкция запросов
Route::get('messages-sql', [MsgAnswersController::class, 'messages_sql'])->name('messages-sql');
Route::post('admin-reject-message', [MsgAnswersController::class, 'reject_message'])->name('reject_message');
Route::post('admin-send-message', [MsgAnswersController::class, 'send_message'])->name('send_message');
/*
* Расписанный подход в описании каждой директорий групп пользователей.
*/
// кабинет - группы пользователей
Route::get('groups', [GroupsController::class, 'index'])->name('groups');
// кабинет - добавление форма группы пользователей
Route::get('groups/add', [GroupsController::class, 'add'])->name('add-group');
// кабинет - сохранение формы группы пользователей
Route::post('groups/add', [GroupsController::class, 'store'])->name('add-group-store');
// кабинет - редактирование форма группы пользователей
Route::get('groups/edit/{group}', [GroupsController::class, 'edit'])->name('edit-group');
// кабинет - сохранение редактированной формы группы пользователей
Route::post('groups/edit/{group}', [GroupsController::class, 'update'])->name('update-group');
// кабинет - удаление группы пользователей
Route::delete('groups/delete/{group}', [GroupsController::class, 'destroy'])->name('delete-group');
// кабинет - список админов
Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin');
// справочник Позиции
Route::get('positions', [AdminController::class, 'position'])->name('position');
Route::get('positions/add', [AdminController::class, 'position_add'])->name('add-position');
Route::post('positions/add', [AdminController::class, 'position_add_save'])->name('add-save-position');
Route::get('positions/edit/{position}', [AdminController::class, 'position_edit'])->name('edit-position');
Route::post('position/edit/{position}', [AdminController::class, 'position_update'])->name('update-position');
Route::get('position/delete/{position}', [AdminController::class, 'position_delete'])->name('delete-position');
/////редактор////// кабинет - редактор сайта////////////////////////
Route::get('editor-site', function() {
return view('admin.editor.index');
})->name('editor-site');
// кабинет - редактор шапки-футера сайта
Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks');
Route::get('edit-bloks/add', [CompanyController::class, 'editblock_add'])->name('add-block');
Route::post('edit-bloks/add', [CompanyController::class, 'editblock_store'])->name('add-block-store');
Route::get('edit-bloks/ajax', [CompanyController::class, 'editblock_ajax'])->name('ajax.block');
Route::get('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_edit'])->name('edit-block');
Route::put('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_update'])->name('update-block');
Route::delete('edit-bloks/delete/{block}', [CompanyController::class, 'editblock_destroy'])->name('delete-block');
// кабинет - редактор должности на главной
Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main');
// кабинет - счетчики на главной
Route::get('counters-main', [CompanyController::class, 'counters_main'])->name('counters-main');
Route::post('counters-main/edit/{name}', [CompanyController::class, 'counters_main_update'])->name('counters-main-update');
// кабинет - редактор работодатели на главной
Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main');
Route::post('employers-main-add', [CompanyController::class, 'employers_main_add'])->name('employers-main-add');
Route::post('employers-main-remove', [CompanyController::class, 'employers_main_remove'])->name('employers-main-remove');
// кабинет - редактор seo-сайта
Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo');
Route::get('editor-seo/add', [CompanyController::class, 'editor_seo_add'])->name('add-seo');
Route::post('editor-seo/add', [CompanyController::class, 'editor_seo_store'])->name('add-seo-store');
Route::get('editor-seo/ajax', [CompanyController::class, 'editor_seo_ajax'])->name('ajax.seo');
Route::get('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_edit'])->name('edit-seo');
Route::put('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_update'])->name('update-seo');
Route::delete('editor-seo/delete/{page}', [CompanyController::class, 'editor_seo_destroy'])->name('delete-seo');
// кабинет - редактор страниц
Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages');
// кабинет - добавление страницы
Route::get('editor-pages/add', [CompanyController::class, 'editor_pages_add'])->name('add-page');
// кабинет - сохранение формы страницы
Route::post('editor-page/add', [CompanyController::class, 'editor_pages_store'])->name('add-page-store');
// кабинет - редактирование форма страницы
Route::get('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_edit'])->name('edit-page');
// кабинет - сохранение редактированной формы страницы
Route::put('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_update'])->name('update-page');
// кабинет - удаление страницы
Route::delete('editor-pages/delete/{page}', [CompanyController::class, 'editor_pages_destroy'])->name('delete-page');
// кабинет - реклама сайта
Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames');
Route::get('reclames/add', [CompanyController::class, 'reclames_add'])->name('add-reclames');
Route::post('reclames/add', [CompanyController::class, 'reclames_store'])->name('add-reclames-store');
Route::get('reclames/edit/{reclame}', [CompanyController::class, 'reclames_edit'])->name('edit-reclames');
Route::put('reclames/edit/{reclame}', [CompanyController::class, 'reclames_update'])->name('update-reclames');
Route::delete('reclames/delete/{reclame}', [CompanyController::class, 'reclames_destroy'])->name('delete-reclames');
////////////////////////////////////////////////////////////////////////
// кабинет - отзывы о работодателе для модерации
Route::get('answers', [EmployersController::class, 'answers'])->name('answers');
// Общая страница статистики
Route::get('statics', function () {
return view('admin.static.index');
})->name('statics');
// кабинет - статистика работников
Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers');
// кабинет - статистика вакансий работодателя
Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads');
// кабинет - справочник - блоки информации (дипломы и документы) для резюме работника
/*
* CRUD-операции над справочником дипломы и документы
*/
//Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks');
Route::resource('infobloks', InfoBloksController::class, ['except' => ['show']]);
// кабинет - роли пользователя
Route::get('roles', [UsersController::class, 'roles'])->name('roles');
Route::get('admin_roles', [UsersController::class, 'admin_roles'])->name('admin_roles');
Route::get('logs', function() {
$files = Storage::files('logs/laravel.log');
})->name('logs');
});
// Инструментальные страницы
Route::post('ckeditor/upload', [CKEditorController::class, 'upload'])->name('ckeditor.image-upload');
Route::get('redis/', [PagesController::class, 'redis'])->name('redis');
Route::get('excel/', [PagesController::class, 'excel'])->name('excel');
// Страницы с произвольным контентом
Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page');
// Форма обратной связи
Route::post('form_feedback', [PagesController::class, 'form_feedback'])->name('form_feedback');
// Публичные страницы соискателя
Route::get('workers/profile/{worker}', [WorkerController::class, 'profile'])->name('worker_page');
//Страница вакансии
Route::get('employer/ad/{ad_employer}', [AdEmployerController::class, 'ad_employer'])->name('ad-employer');
//Вакансии
Route::get('vacancies', [MainController::class, 'vacancies'])->name('vacancies');
//Вакансии поиск на главной
Route::get('search-vacancies', [MainController::class, 'search_vacancies'])->name('search_vacancies');
//Вакансии категория детальная
Route::get('list-vacancies/{categories?}', [MainController::class, 'list_vacancies'])->name('list-vacancies');
// Лайк вакансии
Route::get('like-vacancy', [MainController::class, 'like_vacancy'])->name('like-vacancy');
//Детальная страница вакансии - работодателя
Route::get('vacancie/{vacancy}', [FrontEmployersController::class, 'vacancie'])->name('vacancie');
//Судоходные компании
Route::get('shipping-companies', [FrontCompanyController::class, 'shipping_companies'])->name('shipping_companies');
//Детальная инфа о компании
Route::get('info-company/{company}', [FrontCompanyController::class, 'info_company'])->name('info_company');
//Образование
Route::get('education', [EducationFrontController::class, 'index'])->name('education');
Route::get('education/{education}', [EducationFrontController::class, 'show'])->name('show_education')->where('education', '[0-9]+');;
//Новости
Route::get('news', [MainController::class, 'news'])->name('news');
Route::get('detail-new/{new}', [MainController::class, 'detail_new'])->name('detail_new');
//Контакты
Route::get('contacts', [MainController::class, 'contacts'])->name('contacts');
//База резюме
Route::get('bd-resume', [WorkerController::class, 'bd_resume'])->name('bd_resume');
Route::get('bd_resume_danger', function(){
return view('employers.bd_resume_danger');
})->name('bd_resume_danger');
Route::get('like-resume', [MainController::class, 'like_worker'])->name('like_resume');
//Анкета соискателя
Route::get('resume-profile/{worker}', [WorkerController::class, 'resume_profile'])->name('resume_profile');
//Скачать резюме
Route::get('resume-download/{worker}', [WorkerController::class, 'resume_download'])->name('resume_download');
Route::get('resume-download/all', [WorkerController::class, 'resume_download_all'])->name('resume_download_all2');
Route::get('resume-download', [WorkerController::class, 'resume_download_all'])->name('resume_download_all');
//Вход в кабинет
Route::get('login', [MainController::class, 'input_login'])->name('login');
// Выход из кабинета
Route::get('logout', [EmployerController::class, 'logout'])->name('logout');
Route::get( 'register_worker', [WorkerController::class, 'register_worker'])->name('register_worker');
Route::get('register_employer', [EmployerController::class, 'register_employer'])->name('register_employer');
//восстановление пароля
Route::get('repair-password', [MainController::class, 'repair_password'])->name('repair_password');
// Звезда сообщения
Route::post('stars-answer', [WorkerController::class, 'stars_answer'])->name('stars_answer');
// Борьба
Route::get('clear_cookie', function() {
\App\Classes\Cookies_vacancy::clear_vacancy();
return redirect()->route('index');
})->name('clear_cookie');
Route::get('cookies', function() {
return view('cookies');
})->name('cookies');
// Личный кабинет работник
Route::group([
'as' => 'worker.', // имя маршрута, например auth.index
'prefix' => 'worker', // префикс маршрута, например auth/index
'middleware' => ['auth'], ['is_worker'],
], function() {
// Формы редактирования
Route::get('cabinet/basic_information', [WorkerController::class, 'basic_information'])->name('basic_information');
Route::get('cabinet/additional_documents', [WorkerController::class, 'additional_documents'])->name('additional_documents');
// 1 страница - Моя анкета
Route::get('cabinet', [WorkerController::class, 'cabinet'])->name('cabinet');
Route::post('cabinet/{worker}', [WorkerController::class, 'cabinet_save'])->name('cabinet_save');
Route::post('cabinet/cabinet_save_foto/{worker}', [WorkerController::class, 'cabinet_save_foto'])->name('cabinet_save_foto');
// 2 страница - Сообщения
Route::get('cabinet/messages/{type_message}', [WorkerController::class, 'messages'])->name('messages');
Route::get('cabinet/dialog/{chat}', [WorkerController::class, 'dialog'])->name('dialog');
// 3 страница - Избранные вакансии
Route::get('cabinet/favorite', [WorkerController::class, 'favorite'])->name('favorite');
// Продолжение борьбы против колорадов - избранные вакансии
Route::get('кабинет/favorite', [WorkerController::class, 'colorado'])->name('colorado');
// 4 страница - Сменить пароль
Route::get('кабинет/new_password', [WorkerController::class, 'new_password'])->name('new_password');
Route::post('кабинет/new_password/save', [WorkerController::class, 'save_new_password'])->name('save_new_password');
// 5 страница - Удалить профиль
Route::get('кабинет/delete_profile', [WorkerController::class, 'delete_profile'])->name('delete_profile');
Route::post('кабинет/delete_profile/delete', [WorkerController::class, 'delete_profile_result'])->name('deleteprofile_result');
// Резюме -pdf
Route::get('кабинет/download/{worker}', [WorkerController::class, 'download'])->name('download');
// Поднятие анкеты
Route::get('кабинет/up/{worker}', [WorkerController::class, 'up'])->name('up');
Route::post('test123', [WorkerController::class, 'test123'])->name('test123');
// Добавление сертификата
Route::get('кабинет/new_sertificate/{worker}', [WorkerController::class, 'new_sertificate'])->name('new_sertificate');
Route::post('кабинет/add_sertificate', [WorkerController::class, 'add_serificate'])->name('add_serificate');
Route::get('кабинет/edit_sertificate/{worker}/{doc}', [WorkerController::class, 'edit_sertificate'])->name('edit_sertificate');
Route::get('кабинет/edit_sertificate/{doc}', [WorkerController::class, 'update_serificate'])->name('update_serificate');
Route::get('кабинет/delete_sertificate/{doc}', [WorkerController::class, 'delete_sertificate'])->name('delete_sertificate');
// Добавление предыдущих контактов компании
Route::get('кабинет/prev_company/{worker}', [WorkerController::class, 'new_prev_company'])->name('new_prev_company');
Route::post('кабинет/add_prev_company', [WorkerController::class, 'add_prev_company'])->name('add_prev_company');
Route::get('кабинет/edit_prev_company/{doc}/{worker}', [WorkerController::class, 'edit_prev_company'])->name('edit_prev_company');
Route::post('кабинет/update_prev_company/{doc}', [WorkerController::class, 'update_prev_company'])->name('update_prev_company');
Route::get('кабинет/delete_prev_company/{doc}', [WorkerController::class, 'delete_prev_company'])->name('delete_prev_company');
// Добавление документа-диплома
Route::get('кабинет/add_diplom/{worker}', [WorkerController::class, 'add_diplom'])->name('add_diplom');
Route::post('кабинет/add_diplom', [WorkerController::class, 'add_diplom_save'])->name('dop_info_save');
Route::put('кабинет/edit_diploms/{worker}', [WorkerController::class, 'edit_diploms'])->name('edit_diploms');
Route::get('кабинет/delete_ad_diplom/{worker}', [WorkerController::class, 'delete_add_diplom'])->name('delete_add_diplom');
// Добавление стандартного диплома
Route::get('кабинет/add_document/{worker}', [WorkerController::class, 'add_document'])->name('add_document');
Route::post('кабинет/add_document/', [WorkerController::class, 'add_document_save'])->name('add_document_save');
Route::get('кабинет/edit_document/{doc}/{worker}', [WorkerController::class, 'edit_document'])->name('edit_document');
Route::post('кабинет/edit_document/{doc}', [WorkerController::class, 'edit_document_save'])->name('edit_document_save');
Route::get('кабинет/delete_document/{doc}', [WorkerController::class, 'delete_document'])->name('delete_document');
// Отправка сообщения работодателю от соискателя
Route::post('сообщение/', [WorkerController::class, 'new_message'])->name('new_message');
});
// Личный кабинет работодателя
Route::group([
'as' => 'employer.', // имя маршрута, например auth.index
'prefix' => 'employer', // префикс маршрута, например auth/index
'middleware' => ['auth'], !['is_worker'],
], function() {
// 0 страница - Личные данные работодателя
Route::get('cabinet/employer_info', [EmployerController::class, 'employer_info'])->name('employer_info');
Route::post('cabinet/employer_info/{user}', [EmployerController::class, 'employer_info_save'])->name('employer_info_save');
// 1 страница - Профиль
Route::get('cabinet', [EmployerController::class, 'cabinet'])->name('cabinet');
Route::post('cabinet/{Employer}', [EmployerController::class, 'cabinet_save'])->name('cabinet_save');
Route::post('flot_add_ajax', [EmployerController::class, 'save_add_flot'])->name('save_add_flot');
Route::get('flot_delete_ajax/{Flot}', [EmployerController::class, 'delete_flot'])->name('delete_flot');
Route::get('cabinet/flot_edit/{Flot}/{Employer}', [EmployerController::class, 'edit_flot'])->name('edit_flot');
Route::post('cabinet/flot_edit/{Flot}', [EmployerController::class, 'update_flot'])->name('update_flot_save');
Route::get('cabinet/flot', [EmployerController::class, 'slider_flot'])->name('slider_flot');
// 2 страница - Добавление вакансий
Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie');
Route::post('vacancie', [EmployerController::class, 'cabinet_vacancy_save1'])->name('vac_save');
Route::get('cabinet/vacancie_danger', [EmployerController::class, 'cabinet_vacancie_danger'])->name('cabinet_vacancie_danger');
Route::get('selected_people', [EmployerController::class, 'selected_people'])->name('selected_people');
// 3 страница - Мои вакансии
Route::get('cabinet/vacancy_list', [EmployerController::class, 'vacancy_list'])->name('vacancy_list');
Route::get('cabinet/vacancy/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit');
Route::get('cabinet/vacancy-delete/{ad_employer}', [EmployerController::class, 'vacancy_delete'])->name('vacancy_delete');
Route::get('cabinet/vacancy-up/{ad_employer}', [EmployerController::class, 'vacancy_up'])->name('vacancy_up');
Route::get('cabinet/vacancy-eye/{ad_employer}/{status}', [EmployerController::class, 'vacancy_eye'])->name('vacancy_eye');
Route::get('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit');
Route::post('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_save_me'])->name('vacancy_save_me');
// 4.1Ю.
Route::get('cabinet/ad_jobs/create/{ad_employer}', [Ad_jobsController::class, 'add_job_in_vac'])->name('add_job_in_vac');
Route::post('cabinet/ad_jobs/create', [Ad_jobsController::class, 'add_job_in_vac_save'])->name('add_job_in_vac_save');
Route::get('cabinet/ad_jobs/edit/{ad_job}/{ad_employer}', [Ad_jobsController::class, 'edit_job_in_vac'])->name('edit_job_in_vac');
Route::post('cabinet/ad_jobs/edit/{ad_job}', [Ad_jobsController::class, 'edit_job_in_vac_save'])->name('edit_job_in_vac_save');
Route::get('cabinet/ad_jobs/delete/{ad_job}', [Ad_jobsController::class, 'delete_job_in_vac'])->name('delete_job_in_vac');
// 4 страница - Отклики на вакансии
Route::get('cabinet/answers/{employer}', [EmployerController::class, 'answers'])->name('answers');
Route::get('cabinet/status/{employer}', [EmployerController::class, 'supple_status2'])->name('supple');
Route::get('status/{employer}/{ad_response}/{flag}', [EmployerController::class, 'supple_status'])->name('status_msg');
// 5 страница - Сообщения
Route::get('cabinet/messages/{type_message}', [EmployerController::class, 'messages'])->name('messages');
Route::get('cabinet/dialog/{chat}', [EmployerController::class, 'dialog'])->name('dialog');
Route::post('cabinet/send-message', [EmployerController::class, 'send_message'])->name('send_message');
Route::post('test123', [EmployerController::class, 'test123'])->name('test123');
// 6 страница - Избранный
Route::get('cabinet/favorites', [EmployerController::class, 'favorites'])->name('favorites');
//7 страница - База данных
Route::get('cabinet/bd', [EmployerController::class, 'bd'])->name('bd');
//8 страница - База резюме
Route::get('cabinet/bd-tupe', [EmployerController::class, 'bd_tupe'])->name('bd-tupe');
// 9 рассылка сообщений
Route::get('cabinet/send-all-messages', [EmployerController::class, 'send_all_messages'])->name('send_all_messages');
Route::post('cabinet/send-all-messages/send', [EmployerController::class, 'send_all_post'])->name('send_all_post');
// 10 страница FAQ вопросы
Route::get('cabinet/faq', [EmployerController::class, 'faq'])->name('faq');
// 11 страница - Настройка уведомлений
Route::get('cabinet/subscribe', [EmployerController::class, 'subscribe'])->name('subscribe');
Route::get('cabinet/subscribe/save', [EmployerController::class, 'save_subscribe'])->name('save_subscribe');
// 12 страница - Сменить пароль
Route::get('cabinet/password-reset', [EmployerController::class, 'password_reset'])->name('password_reset');
Route::get('cabinet/password-reset/new', [EmployerController::class, 'new_password'])->name('new_password');
// 13 страница - Удаление профиля
Route::get('cabinet/delete-people', [EmployerController::class, 'delete_people'])->name('delete_people');
Route::get('cabinet/action-delete-people', [EmployerController::class, 'action_delete_user'])->name('action_delete_user');
Route::get('cabinet/action-ajax-delete-people', [EmployerController::class, 'ajax_delete_user'])->name('ajax_delete_user');
// Отправил сообщение
Route::post('сообщение/', [EmployerController::class, 'new_message'])->name('new_message');
Route::post('pin_chat/', [EmployerController::class, 'pin_chat'])->name('pin_chat');
Route::post('remove_chat/', [EmployerController::class, 'remove_chat'])->name('remove_chat');
});
Route::get('TestWorker', [WorkerController::class, 'TestWorker'])->name('TestWorker');
Route::post('send_message', [HomeController::class, 'send_message'])->name('send_message');