Commit 1862e7a3a662fafdd48e193fafb2865f9242c894
1 parent
142d287bd2
Exists in
master
and in
1 other branch
Борьба против колорадских жуков и их ленты45.
Showing 3 changed files with 12 additions and 7 deletions Inline Diff
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\User; |
8 | use App\Models\Worker; | 8 | use App\Models\Worker; |
9 | use Illuminate\Auth\Events\Registered; | 9 | use Illuminate\Auth\Events\Registered; |
10 | use Illuminate\Http\JsonResponse; | 10 | use Illuminate\Http\JsonResponse; |
11 | use Illuminate\Http\Request; | 11 | use Illuminate\Http\Request; |
12 | use Illuminate\Support\Facades\Auth; | 12 | use Illuminate\Support\Facades\Auth; |
13 | use Illuminate\Support\Facades\Hash; | 13 | use Illuminate\Support\Facades\Hash; |
14 | use Illuminate\Support\Facades\Validator; | 14 | use Illuminate\Support\Facades\Validator; |
15 | 15 | ||
16 | class WorkerController extends Controller | 16 | class WorkerController extends Controller |
17 | { | 17 | { |
18 | public $status_work = array(0 => 'Ищу работу', 1 => 'Не указано', 2 => 'Не ищу работу'); | 18 | public $status_work = array(0 => 'Ищу работу', 1 => 'Не указано', 2 => 'Не ищу работу'); |
19 | 19 | ||
20 | //профиль | 20 | //профиль |
21 | public function profile(Worker $worker) | 21 | public function profile(Worker $worker) |
22 | { | 22 | { |
23 | $get_date = date('Y.m'); | 23 | $get_date = date('Y.m'); |
24 | 24 | ||
25 | $c = Static_worker::query()->where('year_month', '=', $get_date) | 25 | $c = Static_worker::query()->where('year_month', '=', $get_date) |
26 | ->where('user_id', '=', $worker->users->id) | 26 | ->where('user_id', '=', $worker->users->id) |
27 | ->get(); | 27 | ->get(); |
28 | 28 | ||
29 | if ($c->count() > 0) { | 29 | if ($c->count() > 0) { |
30 | $upd = Static_worker::find($c[0]->id); | 30 | $upd = Static_worker::find($c[0]->id); |
31 | $upd->lookin = $upd->lookin + 1; | 31 | $upd->lookin = $upd->lookin + 1; |
32 | $upd->save(); | 32 | $upd->save(); |
33 | } else { | 33 | } else { |
34 | $crt = new Static_worker(); | 34 | $crt = new Static_worker(); |
35 | $crt->lookin = 1; | 35 | $crt->lookin = 1; |
36 | $crt->year_month = $get_date; | 36 | $crt->year_month = $get_date; |
37 | $crt->user_id = $worker->user_id; | 37 | $crt->user_id = $worker->user_id; |
38 | $crt->save(); | 38 | $crt->save(); |
39 | } | 39 | } |
40 | 40 | ||
41 | $stat = Static_worker::query()->where('year_month', '=', $get_date) | 41 | $stat = Static_worker::query()->where('year_month', '=', $get_date) |
42 | ->where('user_id', '=', $worker->users->id) | 42 | ->where('user_id', '=', $worker->users->id) |
43 | ->get(); | 43 | ->get(); |
44 | 44 | ||
45 | return view('public.workers.profile', compact('worker', 'stat')); | 45 | return view('public.workers.profile', compact('worker', 'stat')); |
46 | } | 46 | } |
47 | 47 | ||
48 | // лист база резюме | 48 | // лист база резюме |
49 | public function bd_resume() | 49 | public function bd_resume() |
50 | { | 50 | { |
51 | $status_work = $this->status_work; | 51 | $status_work = $this->status_work; |
52 | $resumes = Worker::query()->with('users')->with('job_titles'); | 52 | $resumes = Worker::query()->with('users')->with('job_titles'); |
53 | 53 | ||
54 | $res_count = $resumes->count(); | 54 | $res_count = $resumes->count(); |
55 | $resumes = $resumes->paginate(5); | 55 | $resumes = $resumes->paginate(5); |
56 | 56 | ||
57 | return view('resume', compact('resumes', 'status_work', 'res_count')); | 57 | return view('resume', compact('resumes', 'status_work', 'res_count')); |
58 | } | 58 | } |
59 | 59 | ||
60 | // анкета соискателя | 60 | // анкета соискателя |
61 | public function resume_profile(Worker $worker) | 61 | public function resume_profile(Worker $worker) |
62 | { | 62 | { |
63 | $status_work = $this->status_work; | 63 | $status_work = $this->status_work; |
64 | $Query = Worker::query()->with('users')->with('job_titles') | 64 | $Query = Worker::query()->with('users')->with('job_titles') |
65 | ->with('place_worker')->with('sertificate')->with('prev_company') | 65 | ->with('place_worker')->with('sertificate')->with('prev_company') |
66 | ->with('infobloks'); | 66 | ->with('infobloks'); |
67 | $Query = $Query->where('id', '=', $worker->id); | 67 | $Query = $Query->where('id', '=', $worker->id); |
68 | $Query = $Query->get(); | 68 | $Query = $Query->get(); |
69 | return view('worker', compact('Query', 'status_work')); | 69 | return view('worker', compact('Query', 'status_work')); |
70 | } | 70 | } |
71 | 71 | ||
72 | // скачать анкету соискателя | 72 | // скачать анкету соискателя |
73 | public function resume_download(Worker $worker) | 73 | public function resume_download(Worker $worker) |
74 | { | 74 | { |
75 | print_r('Резюме для скачивания'); | 75 | print_r('Резюме для скачивания'); |
76 | } | 76 | } |
77 | 77 | ||
78 | // Кабинет работника | 78 | // Кабинет работника |
79 | public function cabinet(Worker $worker) | 79 | public function cabinet(Worker $worker) |
80 | { | 80 | { |
81 | return view('workers.cabinet', compact('worker')); | 81 | return view('workers.cabinet', compact('worker')); |
82 | } | 82 | } |
83 | 83 | ||
84 | // Сохранение данных | 84 | // Сохранение данных |
85 | public function cabinet_save(Worker $worker, Request $request) | 85 | public function cabinet_save(Worker $worker, Request $request) |
86 | { | 86 | { |
87 | 87 | ||
88 | } | 88 | } |
89 | 89 | ||
90 | // Сообщения данные | 90 | // Сообщения данные |
91 | public function messages($type_message) | 91 | public function messages($type_message) |
92 | { | 92 | { |
93 | $user_id = Auth()->user()->id; | 93 | $user_id = Auth()->user()->id; |
94 | 94 | ||
95 | $messages_input = Message::query()->with('vacancies')->with('user_from')-> | 95 | $messages_input = Message::query()->with('vacancies')->with('user_from')-> |
96 | Where('to_user_id', $user_id)->OrderByDesc('created_at'); | 96 | Where('to_user_id', $user_id)->OrderByDesc('created_at'); |
97 | 97 | ||
98 | $messages_output = Message::query()->with('vacancies')-> | 98 | $messages_output = Message::query()->with('vacancies')-> |
99 | with('user_to')->where('user_id', $user_id)-> | 99 | with('user_to')->where('user_id', $user_id)-> |
100 | OrderByDesc('created_at'); | 100 | OrderByDesc('created_at'); |
101 | 101 | ||
102 | 102 | ||
103 | $count_input = $messages_input->count(); | 103 | $count_input = $messages_input->count(); |
104 | $count_output = $messages_output->count(); | 104 | $count_output = $messages_output->count(); |
105 | 105 | ||
106 | if ($type_message == 'input') { | 106 | if ($type_message == 'input') { |
107 | $messages = $messages_input->paginate(15); | 107 | $messages = $messages_input->paginate(15); |
108 | } | 108 | } |
109 | 109 | ||
110 | if ($type_message == 'output') { | 110 | if ($type_message == 'output') { |
111 | $messages = $messages_output->paginate(15); | 111 | $messages = $messages_output->paginate(15); |
112 | } | 112 | } |
113 | // Вернуть все 100% | 113 | // Вернуть все 100% |
114 | 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')); |
115 | } | 115 | } |
116 | 116 | ||
117 | // Избранный | 117 | // Избранный |
118 | public function favorite() | 118 | public function favorite() |
119 | { | 119 | { |
120 | 120 | dd('dgfghfghfgh'); | |
121 | return view('workers.favorite'); | 121 | return view('workers.favorite'); |
122 | } | 122 | } |
123 | 123 | ||
124 | 124 | ||
125 | // Сменить пароль | 125 | // Сменить пароль |
126 | public function new_password() | 126 | public function new_password() |
127 | { | 127 | { |
128 | return view('workers.new_password'); | 128 | return view('workers.new_password'); |
129 | } | 129 | } |
130 | 130 | ||
131 | // Удаление профиля | 131 | // Удаление профиля |
132 | public function delete_profile() | 132 | public function delete_profile() |
133 | { | 133 | { |
134 | 134 | ||
135 | return view('workers.delete_profile'); | 135 | return view('workers.delete_profile'); |
136 | } | 136 | } |
137 | 137 | ||
138 | // Регистрация соискателя | 138 | // Регистрация соискателя |
139 | public function register_worker(Request $request) | 139 | public function register_worker(Request $request) |
140 | { | 140 | { |
141 | $params = $request->all(); | 141 | $params = $request->all(); |
142 | 142 | ||
143 | $rules = [ | 143 | $rules = [ |
144 | 'surname' => ['required', 'string', 'max:255'], | 144 | 'surname' => ['required', 'string', 'max:255'], |
145 | 'name_man' => ['required', 'string', 'max:255'], | 145 | 'name_man' => ['required', 'string', 'max:255'], |
146 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], | 146 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], |
147 | 'password' => ['required', 'string', 'min:8'], | 147 | 'password' => ['required', 'string', 'min:8'], |
148 | 'confirmed' => ['required', 'string', 'min:8'], | 148 | 'confirmed' => ['required', 'string', 'min:8'], |
149 | ]; | 149 | ]; |
150 | 150 | ||
151 | $messages = [ | 151 | $messages = [ |
152 | 'required' => 'Укажите обязательное поле', | 152 | 'required' => 'Укажите обязательное поле', |
153 | 'min' => [ | 153 | 'min' => [ |
154 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 154 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
155 | 'integer' => 'Поле «:attribute» должно быть :min или больше', | 155 | 'integer' => 'Поле «:attribute» должно быть :min или больше', |
156 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 156 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
157 | ], | 157 | ], |
158 | 'max' => [ | 158 | 'max' => [ |
159 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 159 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
160 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', | 160 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', |
161 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 161 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
162 | ] | 162 | ] |
163 | ]; | 163 | ]; |
164 | 164 | ||
165 | 165 | ||
166 | 166 | ||
167 | if ($request->get('password') !== $request->get('confirmed')){ | 167 | if ($request->get('password') !== $request->get('confirmed')){ |
168 | return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); | 168 | return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); |
169 | } | 169 | } |
170 | 170 | ||
171 | $validator = Validator::make($request->all(), $rules, $messages); | 171 | $validator = Validator::make($request->all(), $rules, $messages); |
172 | 172 | ||
173 | if ($validator->fails()) { | 173 | if ($validator->fails()) { |
174 | return json_encode(Array("ERROR" => "Error: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены")); | 174 | return json_encode(Array("ERROR" => "Error: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены")); |
175 | } else { | 175 | } else { |
176 | $user = $this->create($params); | 176 | $user = $this->create($params); |
177 | event(new Registered($user)); | 177 | event(new Registered($user)); |
178 | 178 | ||
179 | Auth::guard()->login($user); | 179 | Auth::guard()->login($user); |
180 | } | 180 | } |
181 | if ($user) { | 181 | if ($user) { |
182 | return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl()));; | 182 | return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl()));; |
183 | } else { | 183 | } else { |
184 | return json_encode(Array("ERROR" => "Данные были утеряны!")); | 184 | return json_encode(Array("ERROR" => "Данные были утеряны!")); |
185 | } | 185 | } |
186 | } | 186 | } |
187 | 187 | ||
188 | // Создание пользователя | 188 | // Создание пользователя |
189 | protected function create(array $data) | 189 | protected function create(array $data) |
190 | { | 190 | { |
191 | $Use = new User(); | 191 | $Use = new User(); |
192 | $Code_user = $Use->create([ | 192 | $Code_user = $Use->create([ |
193 | 'name' => $data['surname']." ".$data['name_man'], | 193 | 'name' => $data['surname']." ".$data['name_man'], |
194 | 'subscribe_email' => $data['email'], | 194 | 'subscribe_email' => $data['email'], |
195 | 'email' => $data['email'], | 195 | 'email' => $data['email'], |
196 | 'telephone' => $data['telephone'], | 196 | 'telephone' => $data['telephone'], |
197 | 'password' => Hash::make($data['password']), | 197 | 'password' => Hash::make($data['password']), |
198 | 'pubpassword' => base64_encode($data['password']), | 198 | 'pubpassword' => base64_encode($data['password']), |
199 | ]); | 199 | ]); |
200 | dd($Code_user); | 200 | dd($Code_user); |
201 | } | 201 | } |
202 | |||
203 | public function colorado() { | ||
204 | return view('workers.favorite'); | ||
205 | |||
206 | } | ||
202 | } | 207 | } |
203 | 208 | ||
204 | 209 |
resources/views/workers/menu.blade.php
1 | <div class="cabinet__side-item"> | 1 | <div class="cabinet__side-item"> |
2 | <div class="cabinet__menu"> | 2 | <div class="cabinet__menu"> |
3 | <button type="button" class="cabinet__menu-toper js-toggle"> | 3 | <button type="button" class="cabinet__menu-toper js-toggle"> |
4 | <span class="cabinet__menu-toper-text"> | 4 | <span class="cabinet__menu-toper-text"> |
5 | <i> | 5 | <i> |
6 | <svg> | 6 | <svg> |
7 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use> | 7 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use> |
8 | </svg> | 8 | </svg> |
9 | </i> | 9 | </i> |
10 | <span>Моя анкета</span> | 10 | <span>Моя анкета</span> |
11 | </span> | 11 | </span> |
12 | <i class="cabinet__menu-toper-arrow"> | 12 | <i class="cabinet__menu-toper-arrow"> |
13 | <svg> | 13 | <svg> |
14 | <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use> | 14 | <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use> |
15 | </svg> | 15 | </svg> |
16 | </i> | 16 | </i> |
17 | </button> | 17 | </button> |
18 | <div class="cabinet__menu-body"> | 18 | <div class="cabinet__menu-body"> |
19 | <div class="cabinet__menu-items"> | 19 | <div class="cabinet__menu-items"> |
20 | <a href="{{ route('worker.cabinet') }}" class="cabinet__menu-item @if ($item==1) active @endif"> | 20 | <a href="{{ route('worker.cabinet') }}" class="cabinet__menu-item @if ($item==1) active @endif"> |
21 | <i> | 21 | <i> |
22 | <svg> | 22 | <svg> |
23 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use> | 23 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use> |
24 | </svg> | 24 | </svg> |
25 | </i> | 25 | </i> |
26 | <span>Моя анкета</span> | 26 | <span>Моя анкета</span> |
27 | </a> | 27 | </a> |
28 | <a href="{{ route('worker.messages', ['type_message' => 'input']) }}" class="cabinet__menu-item @if ($item==2) active @endif"> | 28 | <a href="{{ route('worker.messages', ['type_message' => 'input']) }}" class="cabinet__menu-item @if ($item==2) active @endif"> |
29 | <i> | 29 | <i> |
30 | <svg> | 30 | <svg> |
31 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-5') }}"></use> | 31 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-5') }}"></use> |
32 | </svg> | 32 | </svg> |
33 | </i> | 33 | </i> |
34 | <span>Сообщения</span> | 34 | <span>Сообщения</span> |
35 | </a> | 35 | </a> |
36 | <a href="{{ route('worker.favorite') }}" class="cabinet__menu-item @if ($item==3) active @endif"> | 36 | <a href="{{ route('worker.colorado') }}" class="cabinet__menu-item @if ($item==3) active @endif"> |
37 | <i> | 37 | <i> |
38 | <svg> | 38 | <svg> |
39 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-6') }}"></use> | 39 | <use xlink:href="{{ asset('images/sprite.svg#cabinet-6') }}"></use> |
40 | </svg> | 40 | </svg> |
41 | </i> | 41 | </i> |
42 | <span>Избранные вакансии</span> | 42 | <span>Избранные вакансии</span> |
43 | </a> | 43 | </a> |
44 | <a href="{{ route('worker.new_password') }}" class="cabinet__menu-item green @if ($item==4) active @endif"> | 44 | <a href="{{ route('worker.new_password') }}" class="cabinet__menu-item green @if ($item==4) active @endif"> |
45 | <i></i> | 45 | <i></i> |
46 | <span>Сменить пароль</span> | 46 | <span>Сменить пароль</span> |
47 | </a> | 47 | </a> |
48 | <a href="{{ route('worker.delete_profile') }}" class="cabinet__menu-item red @if ($item==5) active @endif"> | 48 | <a href="{{ route('worker.delete_profile') }}" class="cabinet__menu-item red @if ($item==5) active @endif"> |
49 | <i></i> | 49 | <i></i> |
50 | <span>Удалить профиль</span> | 50 | <span>Удалить профиль</span> |
51 | </a> | 51 | </a> |
52 | </div> | 52 | </div> |
53 | <div class="cabinet__menu-bottom"> | 53 | <div class="cabinet__menu-bottom"> |
54 | <a href="{{ route('logout') }}" class="button cabinet__menu-leave"> | 54 | <a href="{{ route('logout') }}" class="button cabinet__menu-leave"> |
55 | <svg> | 55 | <svg> |
56 | <use xlink:href="{{ asset('images/sprite.svg#leave') }}"></use> | 56 | <use xlink:href="{{ asset('images/sprite.svg#leave') }}"></use> |
57 | </svg> | 57 | </svg> |
58 | Выход | 58 | Выход |
59 | </a> | 59 | </a> |
60 | <span class="cabinet__menu-copy"> | 60 | <span class="cabinet__menu-copy"> |
61 | © 2020 – Rekamore.su | 61 | © 2020 – Rekamore.su |
62 | </span> | 62 | </span> |
63 | </div> | 63 | </div> |
64 | </div> | 64 | </div> |
65 | </div> | 65 | </div> |
66 | </div> | 66 | </div> |
67 | 67 |
routes/web.php
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 | // Регистрация соискателя | 438 | Route::get( 'register_worker', [WorkerController::class, 'register_worker'])->name('register_worker'); |
439 | Route::get('register-worker', [WorkerController::class, 'register_worker'])->name('register_worker'); | ||
440 | |||
441 | 439 | ||
442 | // Личный кабинет работника | 440 | // Личный кабинет работника |
443 | Route::group([ | 441 | Route::group([ |
444 | 'as' => 'worker.', // имя маршрута, например auth.index | 442 | 'as' => 'worker.', // имя маршрута, например auth.index |
445 | 'prefix' => 'worker', // префикс маршрута, например auth/index | 443 | 'prefix' => 'worker', // префикс маршрута, например auth/index |
446 | 'middleware' => ['auth'], ['is_worker'], | 444 | 'middleware' => ['auth'], ['is_worker'], |
447 | ], function() { | 445 | ], function() { |
448 | // 1 страница - Моя анкета | 446 | // 1 страница - Моя анкета |
449 | Route::get('cabinet', [WorkerController::class, 'cabinet'])->name('cabinet'); | 447 | Route::get('cabinet', [WorkerController::class, 'cabinet'])->name('cabinet'); |
450 | Route::get('cabinet/{worker}', [WorkerController::class, 'cabinet_save'])->name('cabinet_save'); | 448 | Route::get('cabinet/{worker}', [WorkerController::class, 'cabinet_save'])->name('cabinet_save'); |
451 | 449 | ||
452 | // 2 страница - Сообщения | 450 | // 2 страница - Сообщения |
453 | Route::get('cabinet/messages/{type_message}', [WorkerController::class, 'messages'])->name('messages'); | 451 | Route::get('cabinet/messages/{type_message}', [WorkerController::class, 'messages'])->name('messages'); |
454 | 452 | ||
455 | // 3 страница - Избранные вакансии | 453 | // 3 страница - Избранные вакансии |
456 | Route::get('cabinet/favorite', [WorkerController::class, 'favorite'])->name('favorite'); | 454 | Route::get('cabinet/favorite', [WorkerController::class, 'favorite'])->name('favorite'); |
455 | Route::get('кабинет/favorite', [WorkerController::class, 'colorado'])->name('colorado'); | ||
457 | 456 | ||
458 | // 4 страница - Сменить пароль | 457 | // 4 страница - Сменить пароль |
459 | Route::get('cabinet/new_password', [WorkerController::class, 'new_password'])->name('new_password'); | 458 | Route::get('кабинет/new_password', [WorkerController::class, 'new_password'])->name('new_password'); |
460 | 459 | ||
461 | // 5 страница - Удалить профиль | 460 | // 5 страница - Удалить профиль |
462 | Route::get('cabinet/delete_profile', [WorkerController::class, 'delete_profile'])->name('delete_profile'); | 461 | Route::get('кабинет/delete_profile', [WorkerController::class, 'delete_profile'])->name('delete_profile'); |
463 | 462 | ||
464 | // 6 страница - Выход | 463 | // 6 страница - Выход |
464 | |||
465 | }); | 465 | }); |
466 | 466 | ||
467 | // Личный кабинет работодателя | 467 | // Личный кабинет работодателя |
468 | Route::group([ | 468 | Route::group([ |
469 | 'as' => 'employer.', // имя маршрута, например auth.index | 469 | 'as' => 'employer.', // имя маршрута, например auth.index |
470 | 'prefix' => 'employer', // префикс маршрута, например auth/index | 470 | 'prefix' => 'employer', // префикс маршрута, например auth/index |
471 | 'middleware' => ['auth'], !['is_worker'], | 471 | 'middleware' => ['auth'], !['is_worker'], |
472 | ], function() { | 472 | ], function() { |
473 | // 1 страница - Профиль | 473 | // 1 страница - Профиль |
474 | Route::get('cabinet', [EmployerController::class, 'cabinet'])->name('cabinet'); | 474 | Route::get('cabinet', [EmployerController::class, 'cabinet'])->name('cabinet'); |
475 | Route::post('cabinet/{Employer}', [EmployerController::class, 'cabinet_save'])->name('cabinet_save'); | 475 | Route::post('cabinet/{Employer}', [EmployerController::class, 'cabinet_save'])->name('cabinet_save'); |
476 | 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'); |
477 | 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'); |
478 | 478 | ||
479 | // 2 страница - Добавление вакансий | 479 | // 2 страница - Добавление вакансий |
480 | Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie'); | 480 | Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie'); |
481 | 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'); |
482 | Route::post('vacancie', [EmployerController::class, 'cabinet_vacancy_save1'])->name('vac_save'); | 482 | Route::post('vacancie', [EmployerController::class, 'cabinet_vacancy_save1'])->name('vac_save'); |
483 | 483 | ||
484 | // 3 страница - Мои вакансии | 484 | // 3 страница - Мои вакансии |
485 | 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'); |
486 | 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'); |
487 | 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'); |
488 | 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'); |
489 | 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'); |
490 | 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'); |
491 | 491 | ||
492 | // 4 страница - Отклики на вакансии | 492 | // 4 страница - Отклики на вакансии |
493 | Route::get('cabinet/answers/{employer}', [EmployerController::class, 'answers'])->name('answers'); | 493 | Route::get('cabinet/answers/{employer}', [EmployerController::class, 'answers'])->name('answers'); |
494 | Route::get('cabinet/status/{employer}', [EmployerController::class, 'supple_status2'])->name('supple'); | 494 | Route::get('cabinet/status/{employer}', [EmployerController::class, 'supple_status2'])->name('supple'); |
495 | 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'); |
496 | 496 | ||
497 | // 5 страница - Сообщения | 497 | // 5 страница - Сообщения |
498 | Route::get('cabinet/messages/{type_message}', [EmployerController::class, 'messages'])->name('messages'); | 498 | Route::get('cabinet/messages/{type_message}', [EmployerController::class, 'messages'])->name('messages'); |
499 | Route::get('cabinet/dialog/{user1}/{user2}', [EmployerController::class, 'dialog'])->name('dialog'); | 499 | Route::get('cabinet/dialog/{user1}/{user2}', [EmployerController::class, 'dialog'])->name('dialog'); |
500 | 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'); |
501 | Route::post('test123', [EmployerController::class, 'test123'])->name('test123'); | 501 | Route::post('test123', [EmployerController::class, 'test123'])->name('test123'); |
502 | 502 | ||
503 | // 6 страница - Избранный | 503 | // 6 страница - Избранный |
504 | Route::get('cabinet/favorites', [EmployerController::class, 'favorites'])->name('favorites'); | 504 | Route::get('cabinet/favorites', [EmployerController::class, 'favorites'])->name('favorites'); |
505 | 505 | ||
506 | //7 страница - База данных | 506 | //7 страница - База данных |
507 | Route::get('cabinet/bd', [EmployerController::class, 'bd'])->name('bd'); | 507 | Route::get('cabinet/bd', [EmployerController::class, 'bd'])->name('bd'); |
508 | 508 | ||
509 | //8 страница - База резюме | 509 | //8 страница - База резюме |
510 | 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'); |
511 | 511 | ||
512 | // 9 рассылка сообщений | 512 | // 9 рассылка сообщений |
513 | 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'); |
514 | 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'); |
515 | 515 | ||
516 | // 10 страница FAQ вопросы | 516 | // 10 страница FAQ вопросы |
517 | Route::get('cabinet/faq', [EmployerController::class, 'faq'])->name('faq'); | 517 | Route::get('cabinet/faq', [EmployerController::class, 'faq'])->name('faq'); |
518 | 518 | ||
519 | // 11 страница - Настройка уведомлений | 519 | // 11 страница - Настройка уведомлений |
520 | Route::get('cabinet/subscribe', [EmployerController::class, 'subscribe'])->name('subscribe'); | 520 | Route::get('cabinet/subscribe', [EmployerController::class, 'subscribe'])->name('subscribe'); |
521 | 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'); |
522 | 522 | ||
523 | // 12 страница - Сменить пароль | 523 | // 12 страница - Сменить пароль |
524 | 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'); |
525 | 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'); |
526 | 526 | ||
527 | // 13 страница - Удаление профиля | 527 | // 13 страница - Удаление профиля |
528 | 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'); |
529 | 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'); |