Commit c32d1a96ec71a69ddf46bfecca920f4589fd7e1d
1 parent
0fc30621f7
Exists in
master
and in
1 other branch
Работа по почтовым сообщениям и странице условия
Showing 11 changed files with 337 additions and 2 deletions Inline Diff
- app/Http/Controllers/EmployerController.php
- app/Http/Controllers/PagesController.php
- app/Http/Requests/RequestSendAdmin.php
- app/Mail/MailAdminy.php
- public/css/telegram.css
- resources/views/emails/send_adminy.blade.php
- resources/views/employers/list_vacancy.blade.php
- resources/views/employers/send_all_danger.blade.php
- resources/views/layout/frontend.blade.php
- resources/views/pages.blade.php
- routes/web.php
app/Http/Controllers/EmployerController.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace App\Http\Controllers; | 3 | namespace App\Http\Controllers; |
4 | 4 | ||
5 | use App\Classes\RusDate; | 5 | use App\Classes\RusDate; |
6 | use App\Classes\Tools; | 6 | use App\Classes\Tools; |
7 | use App\Http\Requests\BaseUser_min_Request; | 7 | use App\Http\Requests\BaseUser_min_Request; |
8 | use App\Http\Requests\BaseUserRequest; | 8 | use App\Http\Requests\BaseUserRequest; |
9 | use App\Http\Requests\FlotRequest; | 9 | use App\Http\Requests\FlotRequest; |
10 | use App\Http\Requests\MessagesRequiest; | 10 | use App\Http\Requests\MessagesRequiest; |
11 | use App\Http\Requests\VacancyRequestEdit; | 11 | use App\Http\Requests\VacancyRequestEdit; |
12 | use App\Http\Requests\VacansiaRequiest; | 12 | use App\Http\Requests\VacansiaRequiest; |
13 | use App\Mail\MailSotrudnichestvo; | 13 | use App\Mail\MailSotrudnichestvo; |
14 | use App\Mail\SendAllMessages; | 14 | use App\Mail\SendAllMessages; |
15 | use App\Models\Ad_employer; | 15 | use App\Models\Ad_employer; |
16 | use App\Models\Ad_jobs; | 16 | use App\Models\Ad_jobs; |
17 | use App\Models\ad_response; | 17 | use App\Models\ad_response; |
18 | use App\Models\Category; | 18 | use App\Models\Category; |
19 | use App\Models\Education; | 19 | use App\Models\Education; |
20 | use App\Models\Employer; | 20 | use App\Models\Employer; |
21 | use App\Models\employers_main; | 21 | use App\Models\employers_main; |
22 | use App\Models\Flot; | 22 | use App\Models\Flot; |
23 | use App\Models\Job_title; | 23 | use App\Models\Job_title; |
24 | use App\Models\Like_vacancy; | 24 | use App\Models\Like_vacancy; |
25 | use App\Models\Like_worker; | 25 | use App\Models\Like_worker; |
26 | use App\Models\Message; | 26 | use App\Models\Message; |
27 | use App\Models\Positions; | 27 | use App\Models\Positions; |
28 | use App\Models\Worker; | 28 | use App\Models\Worker; |
29 | use Carbon\Carbon; | 29 | use Carbon\Carbon; |
30 | use Illuminate\Auth\Events\Registered; | 30 | use Illuminate\Auth\Events\Registered; |
31 | use Illuminate\Database\Eloquent\Builder; | 31 | use Illuminate\Database\Eloquent\Builder; |
32 | use Illuminate\Database\Eloquent\Model; | 32 | use Illuminate\Database\Eloquent\Model; |
33 | use Illuminate\Foundation\Auth\User; | 33 | use Illuminate\Foundation\Auth\User; |
34 | use Illuminate\Http\Request; | 34 | use Illuminate\Http\Request; |
35 | use Illuminate\Support\Facades\Auth; | 35 | use Illuminate\Support\Facades\Auth; |
36 | use Illuminate\Support\Facades\Hash; | 36 | use Illuminate\Support\Facades\Hash; |
37 | use Illuminate\Support\Facades\Mail; | 37 | use Illuminate\Support\Facades\Mail; |
38 | use Illuminate\Support\Facades\Storage; | 38 | use Illuminate\Support\Facades\Storage; |
39 | use App\Models\User as User_Model; | 39 | use App\Models\User as User_Model; |
40 | use Illuminate\Support\Facades\Validator; | 40 | use Illuminate\Support\Facades\Validator; |
41 | 41 | ||
42 | class EmployerController extends Controller | 42 | class EmployerController extends Controller |
43 | { | 43 | { |
44 | public function vacancie($vacancy, Request $request) { | 44 | public function vacancie($vacancy, Request $request) { |
45 | $title = 'Заголовок вакансии'; | 45 | $title = 'Заголовок вакансии'; |
46 | $Query = Ad_employer::with('jobs')-> | 46 | $Query = Ad_employer::with('jobs')-> |
47 | with('cat')-> | 47 | with('cat')-> |
48 | with('employer')-> | 48 | with('employer')-> |
49 | with('jobs_code')-> | 49 | with('jobs_code')-> |
50 | select('ad_employers.*')-> | 50 | select('ad_employers.*')-> |
51 | where('id', '=', $vacancy)->get(); | 51 | where('id', '=', $vacancy)->get(); |
52 | 52 | ||
53 | if (isset(Auth()->user()->id)) | 53 | if (isset(Auth()->user()->id)) |
54 | $uid = Auth()->user()->id; | 54 | $uid = Auth()->user()->id; |
55 | else | 55 | else |
56 | $uid = 0; | 56 | $uid = 0; |
57 | $title = $Query[0]->name; | 57 | $title = $Query[0]->name; |
58 | if ($request->ajax()) { | 58 | if ($request->ajax()) { |
59 | return view('ajax.vacance-item', compact('Query','uid')); | 59 | return view('ajax.vacance-item', compact('Query','uid')); |
60 | } else { | 60 | } else { |
61 | return view('vacance-item', compact('title', 'Query', 'uid')); | 61 | return view('vacance-item', compact('title', 'Query', 'uid')); |
62 | } | 62 | } |
63 | } | 63 | } |
64 | 64 | ||
65 | public function logout() { | 65 | public function logout() { |
66 | Auth::logout(); | 66 | Auth::logout(); |
67 | return redirect()->route('index') | 67 | return redirect()->route('index') |
68 | ->with('success', 'Вы вышли из личного кабинета'); | 68 | ->with('success', 'Вы вышли из личного кабинета'); |
69 | } | 69 | } |
70 | 70 | ||
71 | public function employer_info() { | 71 | public function employer_info() { |
72 | // код юзера | 72 | // код юзера |
73 | $user_info = Auth()->user(); | 73 | $user_info = Auth()->user(); |
74 | // вьюшка для вывода данных | 74 | // вьюшка для вывода данных |
75 | return view('employers.info', compact('user_info')); | 75 | return view('employers.info', compact('user_info')); |
76 | } | 76 | } |
77 | 77 | ||
78 | public function employer_info_save(User_Model $user, BaseUser_min_Request $request) { | 78 | public function employer_info_save(User_Model $user, BaseUser_min_Request $request) { |
79 | // Все данные через реквест | 79 | // Все данные через реквест |
80 | $all = $request->all(); | 80 | $all = $request->all(); |
81 | unset($all['_token']); | 81 | unset($all['_token']); |
82 | // обновление | 82 | // обновление |
83 | $user->update($all); | 83 | $user->update($all); |
84 | return redirect()->route('employer.employer_info'); | 84 | return redirect()->route('employer.employer_info'); |
85 | } | 85 | } |
86 | 86 | ||
87 | public function cabinet() { | 87 | public function cabinet() { |
88 | $id = Auth()->user()->id; | 88 | $id = Auth()->user()->id; |
89 | $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> | 89 | $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> |
90 | WhereHas('users', | 90 | WhereHas('users', |
91 | function (Builder $query) use ($id) {$query->Where('id', $id); | 91 | function (Builder $query) use ($id) {$query->Where('id', $id); |
92 | })->get(); | 92 | })->get(); |
93 | return view('employers.cabinet45', compact('Employer')); | 93 | return view('employers.cabinet45', compact('Employer')); |
94 | } | 94 | } |
95 | 95 | ||
96 | public function slider_flot() { | 96 | public function slider_flot() { |
97 | $id = Auth()->user()->id; | 97 | $id = Auth()->user()->id; |
98 | $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> | 98 | $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> |
99 | WhereHas('users', | 99 | WhereHas('users', |
100 | function (Builder $query) use ($id) {$query->Where('id', $id); | 100 | function (Builder $query) use ($id) {$query->Where('id', $id); |
101 | })->get(); | 101 | })->get(); |
102 | return view('employers.fly-flot', compact('Employer')); | 102 | return view('employers.fly-flot', compact('Employer')); |
103 | } | 103 | } |
104 | 104 | ||
105 | public function cabinet_save(Employer $Employer, Request $request) { | 105 | public function cabinet_save(Employer $Employer, Request $request) { |
106 | $params = $request->all(); | 106 | $params = $request->all(); |
107 | $params['user_id'] = Auth()->user()->id; | 107 | $params['user_id'] = Auth()->user()->id; |
108 | $id = $Employer->id; | 108 | $id = $Employer->id; |
109 | 109 | ||
110 | if ($request->has('logo')) { | 110 | if ($request->has('logo')) { |
111 | if (!empty($Employer->logo)) { | 111 | if (!empty($Employer->logo)) { |
112 | Storage::delete($Employer->logo); | 112 | Storage::delete($Employer->logo); |
113 | } | 113 | } |
114 | $params['logo'] = $request->file('logo')->store("employer/$id", 'public'); | 114 | $params['logo'] = $request->file('logo')->store("employer/$id", 'public'); |
115 | } | 115 | } |
116 | 116 | ||
117 | $Employer->update($params); | 117 | $Employer->update($params); |
118 | 118 | ||
119 | return redirect()->route('employer.cabinet')->with('success', 'Данные были успешно сохранены'); | 119 | return redirect()->route('employer.cabinet')->with('success', 'Данные были успешно сохранены'); |
120 | } | 120 | } |
121 | 121 | ||
122 | public function save_add_flot(FlotRequest $request) { | 122 | public function save_add_flot(FlotRequest $request) { |
123 | // отмена | 123 | // отмена |
124 | $params = $request->all(); | 124 | $params = $request->all(); |
125 | 125 | ||
126 | if ($request->has('image')) { | 126 | if ($request->has('image')) { |
127 | $params['image'] = $request->file('image')->store("flot", 'public'); | 127 | $params['image'] = $request->file('image')->store("flot", 'public'); |
128 | } | 128 | } |
129 | Flot::create($params); | 129 | Flot::create($params); |
130 | $data_flots = Flot::query()->where('employer_id', $request->get('employer_if'))->get(); | 130 | $data_flots = Flot::query()->where('employer_id', $request->get('employer_if'))->get(); |
131 | return redirect()->route('employer.slider_flot')->with('success', 'Новый корабль был добавлен'); | 131 | return redirect()->route('employer.slider_flot')->with('success', 'Новый корабль был добавлен'); |
132 | } | 132 | } |
133 | 133 | ||
134 | public function edit_flot(Flot $Flot, Employer $Employer) { | 134 | public function edit_flot(Flot $Flot, Employer $Employer) { |
135 | return view('employers.edit-flot', compact('Flot', 'Employer')); | 135 | return view('employers.edit-flot', compact('Flot', 'Employer')); |
136 | } | 136 | } |
137 | 137 | ||
138 | public function update_flot(FlotRequest $request, Flot $Flot) { | 138 | public function update_flot(FlotRequest $request, Flot $Flot) { |
139 | $params = $request->all(); | 139 | $params = $request->all(); |
140 | 140 | ||
141 | if ($request->has('image')) { | 141 | if ($request->has('image')) { |
142 | if (!empty($flot->image)) { | 142 | if (!empty($flot->image)) { |
143 | Storage::delete($flot->image); | 143 | Storage::delete($flot->image); |
144 | } | 144 | } |
145 | $params['image'] = $request->file('image')->store("flot", 'public'); | 145 | $params['image'] = $request->file('image')->store("flot", 'public'); |
146 | } else { | 146 | } else { |
147 | if (!empty($flot->image)) $params['image'] = $flot->image; | 147 | if (!empty($flot->image)) $params['image'] = $flot->image; |
148 | } | 148 | } |
149 | 149 | ||
150 | $Flot->update($params); | 150 | $Flot->update($params); |
151 | return redirect()->route('employer.slider_flot')->with('success', 'Новый корабль был добавлен'); | 151 | return redirect()->route('employer.slider_flot')->with('success', 'Новый корабль был добавлен'); |
152 | } | 152 | } |
153 | 153 | ||
154 | public function delete_flot(Flot $Flot) { | 154 | public function delete_flot(Flot $Flot) { |
155 | $data_flots = Flot::query()->where('employer_id', $Flot->employer_id)->get(); | 155 | $data_flots = Flot::query()->where('employer_id', $Flot->employer_id)->get(); |
156 | 156 | ||
157 | if (isset($Flot->id)) $Flot->delete(); | 157 | if (isset($Flot->id)) $Flot->delete(); |
158 | return redirect()->route('employer.slider_flot')->with('success', 'Корабль был удален'); | 158 | return redirect()->route('employer.slider_flot')->with('success', 'Корабль был удален'); |
159 | } | 159 | } |
160 | 160 | ||
161 | // Форма добавления вакансий | 161 | // Форма добавления вакансий |
162 | public function cabinet_vacancie() { | 162 | public function cabinet_vacancie() { |
163 | $id = Auth()->user()->id; | 163 | $id = Auth()->user()->id; |
164 | 164 | ||
165 | if (Auth()->user()->is_public) { | 165 | if (Auth()->user()->is_public) { |
166 | $categories = Category::query()->active()->get(); | 166 | $categories = Category::query()->active()->get(); |
167 | 167 | ||
168 | $jobs = Job_title::query()->OrderBy('name')->where('is_remove', '=', '0')->where('is_bd', '=', '0')->get(); | 168 | $jobs = Job_title::query()->OrderBy('name')->where('is_remove', '=', '0')->where('is_bd', '=', '0')->get(); |
169 | $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> | 169 | $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> |
170 | 170 | ||
171 | WhereHas('users', | 171 | WhereHas('users', |
172 | function (Builder $query) use ($id) { | 172 | function (Builder $query) use ($id) { |
173 | $query->Where('id', $id); | 173 | $query->Where('id', $id); |
174 | })->get(); | 174 | })->get(); |
175 | 175 | ||
176 | return view('employers.add_vacancy', compact('Employer', 'jobs', 'categories')); | 176 | return view('employers.add_vacancy', compact('Employer', 'jobs', 'categories')); |
177 | } else { | 177 | } else { |
178 | return redirect()->route('employer.cabinet_vacancie_danger'); | 178 | return redirect()->route('employer.cabinet_vacancie_danger'); |
179 | } | 179 | } |
180 | } | 180 | } |
181 | 181 | ||
182 | // Форма предупреждения об оплате | 182 | // Форма предупреждения об оплате |
183 | public function cabinet_vacancie_danger() { | 183 | public function cabinet_vacancie_danger() { |
184 | return view('employers.add_vacancy_danger'); | 184 | return view('employers.add_vacancy_danger'); |
185 | } | 185 | } |
186 | 186 | ||
187 | // Сохранение вакансии | 187 | // Сохранение вакансии |
188 | public function cabinet_vacancy_save1(VacancyRequestEdit $request) { | 188 | public function cabinet_vacancy_save1(VacancyRequestEdit $request) { |
189 | $params_emp = $request->all(); | 189 | $params_emp = $request->all(); |
190 | 190 | ||
191 | $params_job["job_title_id"] = $params_emp['job_title_id']; | 191 | $params_job["job_title_id"] = $params_emp['job_title_id']; |
192 | //$params_job["min_salary"] = $params_emp['min_salary']; | 192 | //$params_job["min_salary"] = $params_emp['min_salary']; |
193 | //$params_job["max_salary"] = $params_emp['max_salary']; | 193 | //$params_job["max_salary"] = $params_emp['max_salary']; |
194 | //$params_job["region"] = $params_emp['region']; | 194 | //$params_job["region"] = $params_emp['region']; |
195 | //$params_job["power"] = $params_emp['power']; | 195 | //$params_job["power"] = $params_emp['power']; |
196 | //$params_job["sytki"] = $params_emp['sytki']; | 196 | //$params_job["sytki"] = $params_emp['sytki']; |
197 | //$params_job["start"] = $params_emp['start']; | 197 | //$params_job["start"] = $params_emp['start']; |
198 | //$params_job["flot"] = $params_emp['flot']; | 198 | //$params_job["flot"] = $params_emp['flot']; |
199 | //$params_job["description"] = $params_emp['description']; | 199 | //$params_job["description"] = $params_emp['description']; |
200 | 200 | ||
201 | $ad_jobs = Ad_employer::create($params_emp); | 201 | $ad_jobs = Ad_employer::create($params_emp); |
202 | //$params_job['ad_employer_id'] = $ad_jobs->id; | 202 | //$params_job['ad_employer_id'] = $ad_jobs->id; |
203 | //Ad_jobs::create($params_job); | 203 | //Ad_jobs::create($params_job); |
204 | $ad_jobs->jobs()->sync($request->get('job_title_id')); | 204 | $ad_jobs->jobs()->sync($request->get('job_title_id')); |
205 | 205 | ||
206 | return redirect()->route('employer.vacancy_list'); | 206 | return redirect()->route('employer.vacancy_list'); |
207 | } | 207 | } |
208 | 208 | ||
209 | // Список вакансий | 209 | // Список вакансий |
210 | public function vacancy_list(Request $request) { | 210 | public function vacancy_list(Request $request) { |
211 | $id = Auth()->user()->id; | 211 | $id = Auth()->user()->id; |
212 | $Employer = Employer::query()->where('user_id', $id)->first(); | 212 | $Employer = Employer::query()->where('user_id', $id)->first(); |
213 | $vacancy_list = Ad_employer::query()->with('jobs')-> | 213 | $vacancy_list = Ad_employer::query()->with('jobs')-> |
214 | with('jobs_code')-> | 214 | with('jobs_code')-> |
215 | where('employer_id', $Employer->id); | 215 | where('employer_id', $Employer->id); |
216 | 216 | ||
217 | if ($request->get('sort')) { | 217 | if ($request->get('sort')) { |
218 | $sort = $request->get('sort'); | 218 | $sort = $request->get('sort'); |
219 | switch ($sort) { | 219 | switch ($sort) { |
220 | case 'name_up': $vacancy_list = $vacancy_list->orderBy('name')->orderBy('id'); break; | 220 | case 'name_up': $vacancy_list = $vacancy_list->orderBy('name')->orderBy('id'); break; |
221 | case 'name_down': $vacancy_list = $vacancy_list->orderByDesc('name')->orderby('id'); break; | 221 | case 'name_down': $vacancy_list = $vacancy_list->orderByDesc('name')->orderby('id'); break; |
222 | case 'created_at_up': $vacancy_list = $vacancy_list->OrderBy('created_at')->orderBy('id'); break; | 222 | case 'created_at_up': $vacancy_list = $vacancy_list->OrderBy('created_at')->orderBy('id'); break; |
223 | case 'created_at_down': $vacancy_list = $vacancy_list->orderByDesc('created_at')->orderBy('id'); break; | 223 | case 'created_at_down': $vacancy_list = $vacancy_list->orderByDesc('created_at')->orderBy('id'); break; |
224 | case 'default': $vacancy_list = $vacancy_list->orderBy('id')->orderby('updated_at'); break; | 224 | case 'default': $vacancy_list = $vacancy_list->orderBy('id')->orderby('updated_at'); break; |
225 | default: $vacancy_list = $vacancy_list->orderBy('id')->orderby('updated_at'); break; | 225 | default: $vacancy_list = $vacancy_list->orderBy('id')->orderby('updated_at'); break; |
226 | } | 226 | } |
227 | } | 227 | } |
228 | $vacancy_list = $vacancy_list->paginate(4); | 228 | $vacancy_list = $vacancy_list->paginate(4); |
229 | 229 | ||
230 | //ajax | 230 | //ajax |
231 | if ($request->ajax()) { | 231 | if ($request->ajax()) { |
232 | return view('employers.ajax.list_vacancy', compact('vacancy_list', 'Employer')); | 232 | return view('employers.ajax.list_vacancy', compact('vacancy_list', 'Employer')); |
233 | } else { | 233 | } else { |
234 | return view('employers.list_vacancy', compact('vacancy_list', 'Employer')); | 234 | return view('employers.list_vacancy', compact('vacancy_list', 'Employer')); |
235 | } | 235 | } |
236 | } | 236 | } |
237 | 237 | ||
238 | // Карточка вакансии | 238 | // Карточка вакансии |
239 | public function vacancy_edit(Ad_employer $ad_employer) { | 239 | public function vacancy_edit(Ad_employer $ad_employer) { |
240 | $id = Auth()->user()->id; | 240 | $id = Auth()->user()->id; |
241 | $Positions = Category::query()->where('is_remove', '=', '0')->get(); | 241 | $Positions = Category::query()->where('is_remove', '=', '0')->get(); |
242 | $jobs = Job_title::query()->OrderBy('name')-> | 242 | $jobs = Job_title::query()->OrderBy('name')-> |
243 | where('is_remove', 0)->where('is_bd', '=' , '0')->get(); | 243 | where('is_remove', 0)->where('is_bd', '=' , '0')->get(); |
244 | 244 | ||
245 | $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> | 245 | $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> |
246 | where('user_id', $id)->first(); | 246 | where('user_id', $id)->first(); |
247 | 247 | ||
248 | return view('employers.edit_vacancy', compact('ad_employer', 'Positions','Employer', 'jobs')); | 248 | return view('employers.edit_vacancy', compact('ad_employer', 'Positions','Employer', 'jobs')); |
249 | } | 249 | } |
250 | 250 | ||
251 | // Сохранение-редактирование записи | 251 | // Сохранение-редактирование записи |
252 | public function vacancy_save_me(VacancyRequestEdit $request, Ad_employer $ad_employer) { | 252 | public function vacancy_save_me(VacancyRequestEdit $request, Ad_employer $ad_employer) { |
253 | $params = $request->all(); | 253 | $params = $request->all(); |
254 | 254 | ||
255 | //$jobs['flot'] = $params['flot']; | 255 | //$jobs['flot'] = $params['flot']; |
256 | //$jobs['job_title_id'] = $params['job_title_id']; | 256 | //$jobs['job_title_id'] = $params['job_title_id']; |
257 | //$titles['position_id'] = $params['position_id']; | 257 | //$titles['position_id'] = $params['position_id']; |
258 | //unset($params['job_title_id']); | 258 | //unset($params['job_title_id']); |
259 | 259 | ||
260 | $ad_employer->update($params); | 260 | $ad_employer->update($params); |
261 | 261 | ||
262 | //$job_ = Ad_jobs::query()->where('job_title_id', $jobs['job_title_id'])-> | 262 | //$job_ = Ad_jobs::query()->where('job_title_id', $jobs['job_title_id'])-> |
263 | // where('ad_employer_id', $ad_employer->id)->first(); | 263 | // where('ad_employer_id', $ad_employer->id)->first(); |
264 | //$data = Ad_jobs::find($job_->id); | 264 | //$data = Ad_jobs::find($job_->id); |
265 | //$ad_jobs = $data->update($jobs); | 265 | //$ad_jobs = $data->update($jobs); |
266 | 266 | ||
267 | return redirect()->route('employer.vacancy_list'); | 267 | return redirect()->route('employer.vacancy_list'); |
268 | } | 268 | } |
269 | 269 | ||
270 | // Сохранение карточки вакансии | 270 | // Сохранение карточки вакансии |
271 | public function vacancy_save(Request $request, Ad_employer $ad_employer) { | 271 | public function vacancy_save(Request $request, Ad_employer $ad_employer) { |
272 | $all = $request->all(); | 272 | $all = $request->all(); |
273 | $ad_employer->update($all); | 273 | $ad_employer->update($all); |
274 | return redirect()->route('employer.cabinet_vacancie'); | 274 | return redirect()->route('employer.cabinet_vacancie'); |
275 | } | 275 | } |
276 | 276 | ||
277 | // Удаление карточки вакансии | 277 | // Удаление карточки вакансии |
278 | public function vacancy_delete(Ad_employer $ad_employer) { | 278 | public function vacancy_delete(Ad_employer $ad_employer) { |
279 | $ad_employer->delete(); | 279 | $ad_employer->delete(); |
280 | 280 | ||
281 | return redirect()->route('employer.vacancy_list') | 281 | return redirect()->route('employer.vacancy_list') |
282 | ->with('success', 'Данные были успешно сохранены'); | 282 | ->with('success', 'Данные были успешно сохранены'); |
283 | } | 283 | } |
284 | 284 | ||
285 | // Обновление даты | 285 | // Обновление даты |
286 | public function vacancy_up(Ad_employer $ad_employer) { | 286 | public function vacancy_up(Ad_employer $ad_employer) { |
287 | $up = date('m/d/Y h:i:s', time());; | 287 | $up = date('m/d/Y h:i:s', time());; |
288 | $vac_emp = Ad_employer::findOrFail($ad_employer->id); | 288 | $vac_emp = Ad_employer::findOrFail($ad_employer->id); |
289 | $vac_emp->updated_at = $up; | 289 | $vac_emp->updated_at = $up; |
290 | $vac_emp->save(); | 290 | $vac_emp->save(); |
291 | 291 | ||
292 | return redirect()->route('employer.vacancy_list'); | 292 | return redirect()->route('employer.vacancy_list'); |
293 | // начало конца | 293 | // начало конца |
294 | } | 294 | } |
295 | 295 | ||
296 | //Видимость вакансии | 296 | //Видимость вакансии |
297 | public function vacancy_eye(Ad_employer $ad_employer, $status) { | 297 | public function vacancy_eye(Ad_employer $ad_employer, $status) { |
298 | $vac_emp = Ad_employer::findOrFail($ad_employer->id); | 298 | $vac_emp = Ad_employer::findOrFail($ad_employer->id); |
299 | $vac_emp->active_is = $status; | 299 | $vac_emp->active_is = $status; |
300 | $vac_emp->save(); | 300 | $vac_emp->save(); |
301 | 301 | ||
302 | return redirect()->route('employer.vacancy_list'); | 302 | return redirect()->route('employer.vacancy_list'); |
303 | } | 303 | } |
304 | 304 | ||
305 | //Вакансия редактирования (шаблон) | 305 | //Вакансия редактирования (шаблон) |
306 | public function vacancy_update(Ad_employer $id) { | 306 | public function vacancy_update(Ad_employer $id) { |
307 | 307 | ||
308 | } | 308 | } |
309 | 309 | ||
310 | //Отклики на вакансию - лист | 310 | //Отклики на вакансию - лист |
311 | public function answers(Employer $employer, Request $request) { | 311 | public function answers(Employer $employer, Request $request) { |
312 | $user_id = Auth()->user()->id; | 312 | $user_id = Auth()->user()->id; |
313 | $answer = Ad_employer::query()->where('employer_id', $employer->id); | 313 | $answer = Ad_employer::query()->where('employer_id', $employer->id); |
314 | if ($request->has('search')) { | 314 | if ($request->has('search')) { |
315 | $search = trim($request->get('search')); | 315 | $search = trim($request->get('search')); |
316 | if (!empty($search)) $answer = $answer->where('name', 'LIKE', "%$search%"); | 316 | if (!empty($search)) $answer = $answer->where('name', 'LIKE', "%$search%"); |
317 | } | 317 | } |
318 | 318 | ||
319 | $answer = $answer->with('response')->get(); | 319 | $answer = $answer->with('response')->get(); |
320 | 320 | ||
321 | return view('employers.list_answer', compact('answer', 'user_id', 'employer')); | 321 | return view('employers.list_answer', compact('answer', 'user_id', 'employer')); |
322 | } | 322 | } |
323 | 323 | ||
324 | //Обновление статуса | 324 | //Обновление статуса |
325 | public function supple_status(employer $employer, ad_response $ad_response, $flag) { | 325 | public function supple_status(employer $employer, ad_response $ad_response, $flag) { |
326 | $ad_response->update(Array('flag' => $flag)); | 326 | $ad_response->update(Array('flag' => $flag)); |
327 | return redirect()->route('employer.answers', ['employer' => $employer->id]); | 327 | return redirect()->route('employer.answers', ['employer' => $employer->id]); |
328 | } | 328 | } |
329 | 329 | ||
330 | //Страницы сообщений список | 330 | //Страницы сообщений список |
331 | public function messages($type_message) { | 331 | public function messages($type_message) { |
332 | $user_id = Auth()->user()->id; | 332 | $user_id = Auth()->user()->id; |
333 | 333 | ||
334 | $messages_input = Message::query()->with('vacancies')->with('user_from')-> | 334 | $messages_input = Message::query()->with('vacancies')->with('user_from')-> |
335 | Where('to_user_id', $user_id)->OrderByDesc('created_at'); | 335 | Where('to_user_id', $user_id)->OrderByDesc('created_at'); |
336 | 336 | ||
337 | $messages_output = Message::query()->with('vacancies')-> | 337 | $messages_output = Message::query()->with('vacancies')-> |
338 | with('user_to')->where('user_id', $user_id)-> | 338 | with('user_to')->where('user_id', $user_id)-> |
339 | OrderByDesc('created_at'); | 339 | OrderByDesc('created_at'); |
340 | 340 | ||
341 | 341 | ||
342 | $count_input = $messages_input->count(); | 342 | $count_input = $messages_input->count(); |
343 | $count_output = $messages_output->count(); | 343 | $count_output = $messages_output->count(); |
344 | 344 | ||
345 | if ($type_message == 'input') { | 345 | if ($type_message == 'input') { |
346 | $messages = $messages_input->paginate(5); | 346 | $messages = $messages_input->paginate(5); |
347 | } | 347 | } |
348 | 348 | ||
349 | if ($type_message == 'output') { | 349 | if ($type_message == 'output') { |
350 | $messages = $messages_output->paginate(5); | 350 | $messages = $messages_output->paginate(5); |
351 | } | 351 | } |
352 | 352 | ||
353 | //dd($user_id, $messages[2]->vacancies); | 353 | //dd($user_id, $messages[2]->vacancies); |
354 | //jobs); | 354 | //jobs); |
355 | 355 | ||
356 | return view('employers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id')); | 356 | return view('employers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id')); |
357 | } | 357 | } |
358 | 358 | ||
359 | // Диалог между пользователями | 359 | // Диалог между пользователями |
360 | public function dialog(Request $request, User_Model $user1, User_Model $user2) { | 360 | public function dialog(Request $request, User_Model $user1, User_Model $user2) { |
361 | // Получение параметров. | 361 | // Получение параметров. |
362 | if ($request->has('ad_employer')){ | 362 | if ($request->has('ad_employer')){ |
363 | $ad_employer = $request->get('ad_employer'); | 363 | $ad_employer = $request->get('ad_employer'); |
364 | } else { | 364 | } else { |
365 | $ad_employer = 0; | 365 | $ad_employer = 0; |
366 | } | 366 | } |
367 | 367 | ||
368 | if (isset($user2->id)) { | 368 | if (isset($user2->id)) { |
369 | $companion = User_Model::query()->with('workers')-> | 369 | $companion = User_Model::query()->with('workers')-> |
370 | with('employers')-> | 370 | with('employers')-> |
371 | where('id', $user2->id)->first(); | 371 | where('id', $user2->id)->first(); |
372 | } | 372 | } |
373 | 373 | ||
374 | $Messages = Message::query()-> | 374 | $Messages = Message::query()-> |
375 | where('ad_employer_id', '=', $ad_employer)-> | 375 | where('ad_employer_id', '=', $ad_employer)-> |
376 | where(function($query) use ($user1, $user2) { | 376 | where(function($query) use ($user1, $user2) { |
377 | $query->where('user_id', $user1->id)->where('to_user_id', $user2->id); | 377 | $query->where('user_id', $user1->id)->where('to_user_id', $user2->id); |
378 | })->orWhere(function($query) use ($user1, $user2) { | 378 | })->orWhere(function($query) use ($user1, $user2) { |
379 | $query->where('user_id', $user2->id)->where('to_user_id', $user1->id); | 379 | $query->where('user_id', $user2->id)->where('to_user_id', $user1->id); |
380 | })->where('ad_employer_id', '=', $ad_employer)->OrderBy('created_at')->get(); | 380 | })->where('ad_employer_id', '=', $ad_employer)->OrderBy('created_at')->get(); |
381 | 381 | ||
382 | $id_vac = $Messages[$Messages->count() - 1]->ad_employer_id; | 382 | $id_vac = $Messages[$Messages->count() - 1]->ad_employer_id; |
383 | 383 | ||
384 | //$ad_employer = null; | 384 | //$ad_employer = null; |
385 | //if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first(); | 385 | //if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first(); |
386 | $sender = $user1; | 386 | $sender = $user1; |
387 | 387 | ||
388 | return view('employers.dialog', compact('companion', 'sender', 'ad_employer', 'Messages')); | 388 | return view('employers.dialog', compact('companion', 'sender', 'ad_employer', 'Messages')); |
389 | } | 389 | } |
390 | 390 | ||
391 | // Регистрация работодателя | 391 | // Регистрация работодателя |
392 | public function register_employer(Request $request) { | 392 | public function register_employer(Request $request) { |
393 | $params = $request->all(); | 393 | $params = $request->all(); |
394 | 394 | ||
395 | $rules = [ | 395 | $rules = [ |
396 | //'surname' => ['required', 'string', 'max:255'], | 396 | //'surname' => ['required', 'string', 'max:255'], |
397 | //'name_man' => ['required', 'string', 'max:255'], | 397 | //'name_man' => ['required', 'string', 'max:255'], |
398 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], | 398 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], |
399 | 'name_company' => ['required', 'string', 'max:255'], | 399 | 'name_company' => ['required', 'string', 'max:255'], |
400 | 'password' => ['required', 'string', 'min:6'], | 400 | 'password' => ['required', 'string', 'min:6'], |
401 | ]; | 401 | ]; |
402 | 402 | ||
403 | 403 | ||
404 | $messages = [ | 404 | $messages = [ |
405 | 'required' => 'Укажите обязательное поле', | 405 | 'required' => 'Укажите обязательное поле', |
406 | 'min' => [ | 406 | 'min' => [ |
407 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 407 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
408 | 'integer' => 'Поле «:attribute» должно быть :min или больше', | 408 | 'integer' => 'Поле «:attribute» должно быть :min или больше', |
409 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 409 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
410 | ], | 410 | ], |
411 | 'max' => [ | 411 | 'max' => [ |
412 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 412 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
413 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', | 413 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', |
414 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 414 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
415 | ] | 415 | ] |
416 | ]; | 416 | ]; |
417 | 417 | ||
418 | $email = $request->get('email'); | 418 | $email = $request->get('email'); |
419 | if (!preg_match("/^[a-zA-Z0-9_\-.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-.]+$/", $email)) { | 419 | if (!preg_match("/^[a-zA-Z0-9_\-.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-.]+$/", $email)) { |
420 | return json_encode(Array("ERROR" => "Error: Отсутствует емайл или некорректный емайл")); | 420 | return json_encode(Array("ERROR" => "Error: Отсутствует емайл или некорректный емайл")); |
421 | } | 421 | } |
422 | 422 | ||
423 | if ($request->get('password') !== $request->get('confirmed')){ | 423 | if ($request->get('password') !== $request->get('confirmed')){ |
424 | return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); | 424 | return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); |
425 | } | 425 | } |
426 | 426 | ||
427 | if (strlen($request->get('password')) < 6) { | 427 | if (strlen($request->get('password')) < 6) { |
428 | return json_encode(Array("ERROR" => "Error: Недостаточная длина пароля! Увеличьте себе длину пароля!")); | 428 | return json_encode(Array("ERROR" => "Error: Недостаточная длина пароля! Увеличьте себе длину пароля!")); |
429 | } | 429 | } |
430 | /* | 430 | /* |
431 | $specsumbol = Array('!','~', '#', '$', '%', '^', '&', '*', '(', ')', '-', '=', ';', ':', '<', '>', '?'); | 431 | $specsumbol = Array('!','~', '#', '$', '%', '^', '&', '*', '(', ')', '-', '=', ';', ':', '<', '>', '?'); |
432 | $alpha = Array('Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'Z', | 432 | $alpha = Array('Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'Z', |
433 | 'X', 'C', 'V', 'B', 'N', 'M'); | 433 | 'X', 'C', 'V', 'B', 'N', 'M'); |
434 | $spec_bool = false; | 434 | $spec_bool = false; |
435 | $alpha_bool = false; | 435 | $alpha_bool = false; |
436 | 436 | ||
437 | $haystack = $request->get('password'); | 437 | $haystack = $request->get('password'); |
438 | 438 | ||
439 | foreach ($specsumbol as $it) { | 439 | foreach ($specsumbol as $it) { |
440 | if (strpos($haystack, $it) !== false) { | 440 | if (strpos($haystack, $it) !== false) { |
441 | $spec_bool = true; | 441 | $spec_bool = true; |
442 | } | 442 | } |
443 | } | 443 | } |
444 | 444 | ||
445 | foreach ($alpha as $it) { | 445 | foreach ($alpha as $it) { |
446 | if (strpos($haystack, $it) !== false) { | 446 | if (strpos($haystack, $it) !== false) { |
447 | $alpha_bool = true; | 447 | $alpha_bool = true; |
448 | } | 448 | } |
449 | } | 449 | } |
450 | 450 | ||
451 | if ((!$spec_bool) || (!$alpha_bool)) { | 451 | if ((!$spec_bool) || (!$alpha_bool)) { |
452 | return json_encode(Array("ERROR" => "Error: Нет спецсимволов в пароле, латинские буквы заглавные, а также один из символов: !~#$%^&*()-=;,:<>?")); | 452 | return json_encode(Array("ERROR" => "Error: Нет спецсимволов в пароле, латинские буквы заглавные, а также один из символов: !~#$%^&*()-=;,:<>?")); |
453 | }*/ | 453 | }*/ |
454 | 454 | ||
455 | if (empty($request->get('surname'))) { | 455 | if (empty($request->get('surname'))) { |
456 | $params['surname'] = 'Неизвестно'; | 456 | $params['surname'] = 'Неизвестно'; |
457 | } | 457 | } |
458 | if (empty($request->get('name_man'))) { | 458 | if (empty($request->get('name_man'))) { |
459 | $params['name_man'] = 'Неизвестно'; | 459 | $params['name_man'] = 'Неизвестно'; |
460 | } | 460 | } |
461 | $validator = Validator::make($params, $rules, $messages); | 461 | $validator = Validator::make($params, $rules, $messages); |
462 | 462 | ||
463 | if ($validator->fails()) { | 463 | if ($validator->fails()) { |
464 | return json_encode(Array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); | 464 | return json_encode(Array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); |
465 | } else { | 465 | } else { |
466 | $user = $this->create($params); | 466 | $user = $this->create($params); |
467 | event(new Registered($user)); | 467 | event(new Registered($user)); |
468 | Auth::guard()->login($user); | 468 | Auth::guard()->login($user); |
469 | } | 469 | } |
470 | 470 | ||
471 | if ($user) { | 471 | if ($user) { |
472 | return json_encode(Array("REDIRECT" => redirect()->route('employer.cabinet')->getTargetUrl()));; | 472 | return json_encode(Array("REDIRECT" => redirect()->route('employer.cabinet')->getTargetUrl()));; |
473 | } else { | 473 | } else { |
474 | return json_encode(Array("ERROR" => "Error2: Данные были утеряны!")); | 474 | return json_encode(Array("ERROR" => "Error2: Данные были утеряны!")); |
475 | } | 475 | } |
476 | } | 476 | } |
477 | 477 | ||
478 | // Создание пользователя | 478 | // Создание пользователя |
479 | protected function create(array $data) | 479 | protected function create(array $data) |
480 | { | 480 | { |
481 | $Use = new User_Model(); | 481 | $Use = new User_Model(); |
482 | $Code_user = $Use->create([ | 482 | $Code_user = $Use->create([ |
483 | 'name' => $data['surname']." ".$data['name_man'], | 483 | 'name' => $data['surname']." ".$data['name_man'], |
484 | 'name_man' => $data['name_man'], | 484 | 'name_man' => $data['name_man'], |
485 | 'surname' => $data['surname'], | 485 | 'surname' => $data['surname'], |
486 | 'surname2' => $data['surname2'], | 486 | 'surname2' => $data['surname2'], |
487 | 'subscribe_email' => $data['email'], | 487 | 'subscribe_email' => $data['email'], |
488 | 'email' => $data['email'], | 488 | 'email' => $data['email'], |
489 | 'telephone' => $data['telephone'], | 489 | 'telephone' => $data['telephone'], |
490 | 'is_worker' => 0, | 490 | 'is_worker' => 0, |
491 | 'password' => Hash::make($data['password']), | 491 | 'password' => Hash::make($data['password']), |
492 | 'pubpassword' => base64_encode($data['password']), | 492 | 'pubpassword' => base64_encode($data['password']), |
493 | 'email_verified_at' => Carbon::now() | 493 | 'email_verified_at' => Carbon::now() |
494 | ]); | 494 | ]); |
495 | 495 | ||
496 | if ($Code_user->id > 0) { | 496 | if ($Code_user->id > 0) { |
497 | $Employer = new Employer(); | 497 | $Employer = new Employer(); |
498 | $Employer->user_id = $Code_user->id; | 498 | $Employer->user_id = $Code_user->id; |
499 | $Employer->name_company = $data['name_company']; | 499 | $Employer->name_company = $data['name_company']; |
500 | $Employer->email = $data['email']; | 500 | $Employer->email = $data['email']; |
501 | $Employer->telephone = $data['telephone']; | 501 | $Employer->telephone = $data['telephone']; |
502 | $Employer->code = Tools::generator_id(10); | 502 | $Employer->code = Tools::generator_id(10); |
503 | $Employer->save(); | 503 | $Employer->save(); |
504 | 504 | ||
505 | return $Code_user; | 505 | return $Code_user; |
506 | } | 506 | } |
507 | } | 507 | } |
508 | 508 | ||
509 | // Отправка сообщения от работодателя | 509 | // Отправка сообщения от работодателя |
510 | public function send_message(MessagesRequiest $request) { | 510 | public function send_message(MessagesRequiest $request) { |
511 | $params = $request->all(); | 511 | $params = $request->all(); |
512 | dd($params); | 512 | dd($params); |
513 | $user1 = $params['user_id']; | 513 | $user1 = $params['user_id']; |
514 | $user2 = $params['to_user_id']; | 514 | $user2 = $params['to_user_id']; |
515 | 515 | ||
516 | if ($request->has('file')) { | 516 | if ($request->has('file')) { |
517 | $params['file'] = $request->file('file')->store("messages", 'public'); | 517 | $params['file'] = $request->file('file')->store("messages", 'public'); |
518 | } | 518 | } |
519 | Message::create($params); | 519 | Message::create($params); |
520 | return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]); | 520 | return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]); |
521 | } | 521 | } |
522 | 522 | ||
523 | public function test123(Request $request) { | 523 | public function test123(Request $request) { |
524 | $params = $request->all(); | 524 | $params = $request->all(); |
525 | $user1 = $params['user_id']; | 525 | $user1 = $params['user_id']; |
526 | $user2 = $params['to_user_id']; | 526 | $user2 = $params['to_user_id']; |
527 | 527 | ||
528 | $rules = [ | 528 | $rules = [ |
529 | 'text' => 'required|min:1|max:150000', | 529 | 'text' => 'required|min:1|max:150000', |
530 | 'file' => 'file|mimes:doc,docx,xlsx,csv,txt,xlx,xls,pdf|max:150000' | 530 | 'file' => 'file|mimes:doc,docx,xlsx,csv,txt,xlx,xls,pdf|max:150000' |
531 | ]; | 531 | ]; |
532 | $messages = [ | 532 | $messages = [ |
533 | 'required' => 'Укажите обязательное поле', | 533 | 'required' => 'Укажите обязательное поле', |
534 | 'min' => [ | 534 | 'min' => [ |
535 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 535 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
536 | 'integer' => 'Поле «:attribute» должно быть :min или больше', | 536 | 'integer' => 'Поле «:attribute» должно быть :min или больше', |
537 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 537 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
538 | ], | 538 | ], |
539 | 'max' => [ | 539 | 'max' => [ |
540 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 540 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
541 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', | 541 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', |
542 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 542 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
543 | ] | 543 | ] |
544 | ]; | 544 | ]; |
545 | 545 | ||
546 | $validator = Validator::make($request->all(), $rules, $messages); | 546 | $validator = Validator::make($request->all(), $rules, $messages); |
547 | 547 | ||
548 | if ($validator->fails()) { | 548 | if ($validator->fails()) { |
549 | return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]) | 549 | return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]) |
550 | ->withErrors($validator); | 550 | ->withErrors($validator); |
551 | } else { | 551 | } else { |
552 | if ($request->has('file')) { | 552 | if ($request->has('file')) { |
553 | $params['file'] = $request->file('file')->store("messages", 'public'); | 553 | $params['file'] = $request->file('file')->store("messages", 'public'); |
554 | } | 554 | } |
555 | Message::create($params); | 555 | Message::create($params); |
556 | return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]); | 556 | return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]); |
557 | 557 | ||
558 | } | 558 | } |
559 | } | 559 | } |
560 | 560 | ||
561 | //Избранные люди | 561 | //Избранные люди |
562 | public function favorites(Request $request) { | 562 | public function favorites(Request $request) { |
563 | $IP_address = RusDate::ip_addr_client(); | 563 | $IP_address = RusDate::ip_addr_client(); |
564 | $Arr = Like_worker::Query()->select('code_record')->where('ip_address', '=', $IP_address)->get(); | 564 | $Arr = Like_worker::Query()->select('code_record')->where('ip_address', '=', $IP_address)->get(); |
565 | 565 | ||
566 | if ($Arr->count()) { | 566 | if ($Arr->count()) { |
567 | $A = Array(); | 567 | $A = Array(); |
568 | foreach ($Arr as $it) { | 568 | foreach ($Arr as $it) { |
569 | $A[] = $it->code_record; | 569 | $A[] = $it->code_record; |
570 | } | 570 | } |
571 | 571 | ||
572 | $Workers = Worker::query()->whereIn('id', $A); | 572 | $Workers = Worker::query()->whereIn('id', $A); |
573 | } else { | 573 | } else { |
574 | $Workers = Worker::query()->where('id', '=', '0'); | 574 | $Workers = Worker::query()->where('id', '=', '0'); |
575 | } | 575 | } |
576 | 576 | ||
577 | if (($request->has('search')) && (!empty($request->get('search')))) { | 577 | if (($request->has('search')) && (!empty($request->get('search')))) { |
578 | $search = $request->get('search'); | 578 | $search = $request->get('search'); |
579 | 579 | ||
580 | $Workers = $Workers->WhereHas('users', | 580 | $Workers = $Workers->WhereHas('users', |
581 | function (Builder $query) use ($search) { | 581 | function (Builder $query) use ($search) { |
582 | $query->Where('surname', 'LIKE', "%$search%") | 582 | $query->Where('surname', 'LIKE', "%$search%") |
583 | ->orWhere('name_man', 'LIKE', "%$search%") | 583 | ->orWhere('name_man', 'LIKE', "%$search%") |
584 | ->orWhere('surname2', 'LIKE', "%$search%"); | 584 | ->orWhere('surname2', 'LIKE', "%$search%"); |
585 | }); | 585 | }); |
586 | } else { | 586 | } else { |
587 | $Workers = $Workers->with('users'); | 587 | $Workers = $Workers->with('users'); |
588 | } | 588 | } |
589 | 589 | ||
590 | $Workers = $Workers->get(); | 590 | $Workers = $Workers->get(); |
591 | 591 | ||
592 | 592 | ||
593 | return view('employers.favorite', compact('Workers')); | 593 | return view('employers.favorite', compact('Workers')); |
594 | } | 594 | } |
595 | 595 | ||
596 | // База данных | 596 | // База данных |
597 | public function bd(Request $request) { | 597 | public function bd(Request $request) { |
598 | // для типа BelongsTo | 598 | // для типа BelongsTo |
599 | //$documents = Document::query()->orderBy(Location::select('name') | 599 | //$documents = Document::query()->orderBy(Location::select('name') |
600 | // ->whereColumn('locations.id', 'documents.location_id') | 600 | // ->whereColumn('locations.id', 'documents.location_id') |
601 | //); | 601 | //); |
602 | 602 | ||
603 | // для типа HasOne/Many | 603 | // для типа HasOne/Many |
604 | // $documents = Document::::query()->orderBy(Location::select('name') | 604 | // $documents = Document::::query()->orderBy(Location::select('name') |
605 | // ->whereColumn('locations.document_id', 'documents.id') | 605 | // ->whereColumn('locations.document_id', 'documents.id') |
606 | //); | 606 | //); |
607 | 607 | ||
608 | 608 | ||
609 | $users = User_Model::query()->with('workers'); | 609 | $users = User_Model::query()->with('workers'); |
610 | 610 | ||
611 | if ($request->has('search')) { | 611 | if ($request->has('search')) { |
612 | $find_key = $request->get('search'); | 612 | $find_key = $request->get('search'); |
613 | $users = $users->where('name', 'LIKE', "%$find_key%") | 613 | $users = $users->where('name', 'LIKE', "%$find_key%") |
614 | ->orWhere('surname', 'LIKE', "%$find_key%") | 614 | ->orWhere('surname', 'LIKE', "%$find_key%") |
615 | ->orWhere('name_man', 'LIKE', "%$find_key%") | 615 | ->orWhere('name_man', 'LIKE', "%$find_key%") |
616 | ->orWhere('email', 'LIKE', "%$find_key%") | 616 | ->orWhere('email', 'LIKE', "%$find_key%") |
617 | ->orWhere('telephone', 'LIKE', "%$find_key%"); | 617 | ->orWhere('telephone', 'LIKE', "%$find_key%"); |
618 | } | 618 | } |
619 | 619 | ||
620 | // Данные | 620 | // Данные |
621 | $users = $users->Baseuser()-> | 621 | $users = $users->Baseuser()-> |
622 | orderBy(Worker::select('position_work')->whereColumn('Workers.user_id', 'users.id')); | 622 | orderBy(Worker::select('position_work')->whereColumn('Workers.user_id', 'users.id')); |
623 | $count_users = $users; | 623 | $count_users = $users; |
624 | $users = $users->paginate(5); | 624 | $users = $users->paginate(5); |
625 | 625 | ||
626 | 626 | ||
627 | return view('employers.bd', compact('users', 'count_users')); | 627 | return view('employers.bd', compact('users', 'count_users')); |
628 | } | 628 | } |
629 | 629 | ||
630 | //Настройка уведомлений | 630 | //Настройка уведомлений |
631 | public function subscribe() { | 631 | public function subscribe() { |
632 | return view('employers.subcribe'); | 632 | return view('employers.subcribe'); |
633 | } | 633 | } |
634 | 634 | ||
635 | //Установка уведомлений сохранение | 635 | //Установка уведомлений сохранение |
636 | public function save_subscribe(Request $request) { | 636 | public function save_subscribe(Request $request) { |
637 | dd($request->all()); | 637 | dd($request->all()); |
638 | $msg = $request->validate([ | 638 | $msg = $request->validate([ |
639 | 'subscribe_email' => 'required|email|min:5|max:255', | 639 | 'subscribe_email' => 'required|email|min:5|max:255', |
640 | ]); | 640 | ]); |
641 | return redirect()->route('employer.subscribe')->with('Вы успешно подписались на рассылку'); | 641 | return redirect()->route('employer.subscribe')->with('Вы успешно подписались на рассылку'); |
642 | } | 642 | } |
643 | 643 | ||
644 | //Сбросить форму с паролем | 644 | //Сбросить форму с паролем |
645 | public function password_reset() { | 645 | public function password_reset() { |
646 | $email = Auth()->user()->email; | 646 | $email = Auth()->user()->email; |
647 | return view('employers.password-reset', compact('email')); | 647 | return view('employers.password-reset', compact('email')); |
648 | } | 648 | } |
649 | 649 | ||
650 | //Обновление пароля | 650 | //Обновление пароля |
651 | public function new_password(Request $request) { | 651 | public function new_password(Request $request) { |
652 | $use = Auth()->user(); | 652 | $use = Auth()->user(); |
653 | $request->validate([ | 653 | $request->validate([ |
654 | 'password' => 'required|string', | 654 | 'password' => 'required|string', |
655 | 'new_password' => 'required|string', | 655 | 'new_password' => 'required|string', |
656 | 'new_password2' => 'required|string' | 656 | 'new_password2' => 'required|string' |
657 | ]); | 657 | ]); |
658 | 658 | ||
659 | if ($request->get('new_password') == $request->get('new_password2')) | 659 | if ($request->get('new_password') == $request->get('new_password2')) |
660 | if ($request->get('password') !== $request->get('new_password')) { | 660 | if ($request->get('password') !== $request->get('new_password')) { |
661 | $credentials = $request->only('email', 'password'); | 661 | $credentials = $request->only('email', 'password'); |
662 | if (Auth::attempt($credentials)) { | 662 | if (Auth::attempt($credentials)) { |
663 | 663 | ||
664 | if (!is_null($use->email_verified_at)){ | 664 | if (!is_null($use->email_verified_at)){ |
665 | 665 | ||
666 | $user_data = User_Model::find($use->id); | 666 | $user_data = User_Model::find($use->id); |
667 | $user_data->update([ | 667 | $user_data->update([ |
668 | 'password' => Hash::make($request->get('new_password')), | 668 | 'password' => Hash::make($request->get('new_password')), |
669 | 'pubpassword' => base64_encode($request->get('new_password')), | 669 | 'pubpassword' => base64_encode($request->get('new_password')), |
670 | ]); | 670 | ]); |
671 | return redirect() | 671 | return redirect() |
672 | ->route('employer.password_reset') | 672 | ->route('employer.password_reset') |
673 | ->with('success', 'Поздравляю! Вы обновили свой пароль!'); | 673 | ->with('success', 'Поздравляю! Вы обновили свой пароль!'); |
674 | } | 674 | } |
675 | 675 | ||
676 | return redirect() | 676 | return redirect() |
677 | ->route('employer.password_reset') | 677 | ->route('employer.password_reset') |
678 | ->withError('Данная учетная запись не было верифицированна!'); | 678 | ->withError('Данная учетная запись не было верифицированна!'); |
679 | } | 679 | } |
680 | } | 680 | } |
681 | 681 | ||
682 | return redirect() | 682 | return redirect() |
683 | ->route('employer.password_reset') | 683 | ->route('employer.password_reset') |
684 | ->withErrors('Не совпадение данных, обновите пароли!'); | 684 | ->withErrors('Не совпадение данных, обновите пароли!'); |
685 | } | 685 | } |
686 | 686 | ||
687 | 687 | ||
688 | 688 | ||
689 | // Форма Удаление пипла | 689 | // Форма Удаление пипла |
690 | public function delete_people() { | 690 | public function delete_people() { |
691 | $login = Auth()->user()->email; | 691 | $login = Auth()->user()->email; |
692 | return view('employers.delete_people', compact('login')); | 692 | return view('employers.delete_people', compact('login')); |
693 | } | 693 | } |
694 | 694 | ||
695 | // Удаление аккаунта | 695 | // Удаление аккаунта |
696 | public function action_delete_user(Request $request) { | 696 | public function action_delete_user(Request $request) { |
697 | $Answer = $request->all(); | 697 | $Answer = $request->all(); |
698 | $user_id = Auth()->user()->id; | 698 | $user_id = Auth()->user()->id; |
699 | $request->validate([ | 699 | $request->validate([ |
700 | 'password' => 'required|string', | 700 | 'password' => 'required|string', |
701 | ]); | 701 | ]); |
702 | 702 | ||
703 | $credentials = $request->only('email', 'password'); | 703 | $credentials = $request->only('email', 'password'); |
704 | if (Auth::attempt($credentials)) { | 704 | if (Auth::attempt($credentials)) { |
705 | Auth::logout(); | 705 | Auth::logout(); |
706 | $it = User_Model::find($user_id); | 706 | $it = User_Model::find($user_id); |
707 | $it->delete(); | 707 | $it->delete(); |
708 | return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт'); | 708 | return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт'); |
709 | } else { | 709 | } else { |
710 | return redirect()->route('employer.delete_people') | 710 | return redirect()->route('employer.delete_people') |
711 | ->withErrors( 'Неверный пароль! Нужен корректный пароль'); | 711 | ->withErrors( 'Неверный пароль! Нужен корректный пароль'); |
712 | } | 712 | } |
713 | } | 713 | } |
714 | 714 | ||
715 | public function ajax_delete_user(Request $request) { | 715 | public function ajax_delete_user(Request $request) { |
716 | $Answer = $request->all(); | 716 | $Answer = $request->all(); |
717 | $user_id = Auth()->user()->id; | 717 | $user_id = Auth()->user()->id; |
718 | $request->validate([ | 718 | $request->validate([ |
719 | 'password' => 'required|string', | 719 | 'password' => 'required|string', |
720 | ]); | 720 | ]); |
721 | $credentials = $request->only('email', 'password'); | 721 | $credentials = $request->only('email', 'password'); |
722 | if (Auth::attempt($credentials)) { | 722 | if (Auth::attempt($credentials)) { |
723 | 723 | ||
724 | return json_encode(Array('SUCCESS' => 'Вы успешно удалили свой аккаунт', | 724 | return json_encode(Array('SUCCESS' => 'Вы успешно удалили свой аккаунт', |
725 | 'email' => $request->get('email'), | 725 | 'email' => $request->get('email'), |
726 | 'password' => $request->get('password'))); | 726 | 'password' => $request->get('password'))); |
727 | } else { | 727 | } else { |
728 | return json_encode(Array('ERROR' => 'Неверный пароль! Нужен корректный пароль')); | 728 | return json_encode(Array('ERROR' => 'Неверный пароль! Нужен корректный пароль')); |
729 | } | 729 | } |
730 | } | 730 | } |
731 | 731 | ||
732 | // FAQ - Вопросы/ответы для работодателей и соискателей | 732 | // FAQ - Вопросы/ответы для работодателей и соискателей |
733 | public function faq() { | 733 | public function faq() { |
734 | return view('employers.faq'); | 734 | return view('employers.faq'); |
735 | } | 735 | } |
736 | 736 | ||
737 | // Рассылка сообщений | 737 | // Рассылка сообщений |
738 | public function send_all_messages() { | 738 | public function send_all_messages() { |
739 | return view('employers.send_all'); | 739 | $id = Auth()->user()->id; |
740 | $sending = Employer::query()->where('id', '=', "$id")->first(); | ||
741 | if ($sending->sending_is) | ||
742 | return view('employers.send_all'); | ||
743 | else | ||
744 | return view('employers.send_all_danger'); | ||
740 | } | 745 | } |
741 | 746 | ||
742 | // Отправка сообщений для информации | 747 | // Отправка сообщений для информации |
743 | public function send_all_post(Request $request) { | 748 | public function send_all_post(Request $request) { |
744 | $data = $request->all(); | 749 | $data = $request->all(); |
745 | 750 | ||
746 | $emails = User_Model::query()->where('is_worker', '1')->get(); | 751 | $emails = User_Model::query()->where('is_worker', '1')->get(); |
747 | 752 | ||
748 | foreach ($emails as $e) { | 753 | foreach ($emails as $e) { |
749 | Mail::to($e->email)->send(new SendAllMessages($data)); | 754 | Mail::to($e->email)->send(new SendAllMessages($data)); |
750 | } | 755 | } |
751 | 756 | ||
752 | return redirect()->route('employer.send_all_messages')->with('success', 'Письма были отправлены'); | 757 | return redirect()->route('employer.send_all_messages')->with('success', 'Письма были отправлены'); |
753 | } | 758 | } |
754 | 759 | ||
755 | // База резюме | 760 | // База резюме |
756 | public function bd_tupe(Request $request) { | 761 | public function bd_tupe(Request $request) { |
757 | $Resume = User_Model::query()->with('workers')->where('is_bd', '=', '1')->get(); | 762 | $Resume = User_Model::query()->with('workers')->where('is_bd', '=', '1')->get(); |
758 | 763 | ||
759 | return view('employers.bd_tupe', compact('Resume')); | 764 | return view('employers.bd_tupe', compact('Resume')); |
760 | } | 765 | } |
761 | 766 | ||
762 | ////////////////////////////////////////////////////////////////// | 767 | ////////////////////////////////////////////////////////////////// |
763 | // Отправил сообщение | 768 | // Отправил сообщение |
764 | ////////////////////////////////////////////////////////////////// | 769 | ////////////////////////////////////////////////////////////////// |
765 | public function new_message(Request $request) { | 770 | public function new_message(Request $request) { |
766 | $params = $request->all(); | 771 | $params = $request->all(); |
767 | $id = $params['_user_id']; | 772 | $id = $params['_user_id']; |
768 | $message = new Message(); | 773 | $message = new Message(); |
769 | $message->user_id = $params['_user_id']; | 774 | $message->user_id = $params['_user_id']; |
770 | $message->to_user_id = $params['_to_user_id']; | 775 | $message->to_user_id = $params['_to_user_id']; |
771 | $message->title = $params['title']; | 776 | $message->title = $params['title']; |
772 | $message->text = $params['text']; | 777 | $message->text = $params['text']; |
773 | if ($request->has('_file')) { | 778 | if ($request->has('_file')) { |
774 | $message->file = $request->file('_file')->store("worker/$id", 'public'); | 779 | $message->file = $request->file('_file')->store("worker/$id", 'public'); |
775 | } | 780 | } |
776 | $message->ad_employer_id = $params['_vacancy']; | 781 | $message->ad_employer_id = $params['_vacancy']; |
777 | $message->flag_new = 1; | 782 | $message->flag_new = 1; |
778 | $id_message = $message->save(); | 783 | $id_message = $message->save(); |
779 | 784 | ||
780 | //$data['message_id'] = $id_message; | 785 | //$data['message_id'] = $id_message; |
781 | //$data['ad_employer_id'] = $params['_vacancy']; | 786 | //$data['ad_employer_id'] = $params['_vacancy']; |
782 | //$data['job_title_id'] = 0; | 787 | //$data['job_title_id'] = 0; |
783 | 788 | ||
784 | $data['flag'] = 1; | 789 | $data['flag'] = 1; |
785 | //$ad_responce = ad_response::create($data); | 790 | //$ad_responce = ad_response::create($data); |
786 | return redirect()->route('employer.messages', ['type_message' => 'output']); | 791 | return redirect()->route('employer.messages', ['type_message' => 'output']); |
787 | } | 792 | } |
788 | 793 | ||
789 | // Восстановление пароля | 794 | // Восстановление пароля |
790 | public function repair_password(Request $request) { | 795 | public function repair_password(Request $request) { |
791 | $params = $request->get('email'); | 796 | $params = $request->get('email'); |
792 | } | 797 | } |
793 | 798 | ||
794 | // Избранные люди на корабль | 799 | // Избранные люди на корабль |
795 | public function selected_people(Request $request) { | 800 | public function selected_people(Request $request) { |
796 | $id = $request->get('id'); | 801 | $id = $request->get('id'); |
797 | $favorite_people = Job_title::query()->Notbdif()->where('is_remove', '=', '0')->where('position_id', $id)->get(); | 802 | $favorite_people = Job_title::query()->Notbdif()->where('is_remove', '=', '0')->where('position_id', $id)->get(); |
798 | return view('favorite_people', compact('favorite_people')); | 803 | return view('favorite_people', compact('favorite_people')); |
799 | } | 804 | } |
800 | } | 805 | } |
801 | 806 |
app/Http/Controllers/PagesController.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace App\Http\Controllers; | 3 | namespace App\Http\Controllers; |
4 | 4 | ||
5 | use App\Http\Requests\RequestSendAdmin; | ||
6 | use App\Mail\MailAdminy; | ||
7 | use App\Mail\MailRepair; | ||
5 | use App\Models\pages; | 8 | use App\Models\pages; |
6 | use Illuminate\Http\Request; | 9 | use Illuminate\Http\Request; |
10 | use Illuminate\Support\Facades\Mail; | ||
7 | use Illuminate\Support\Facades\Redis; | 11 | use Illuminate\Support\Facades\Redis; |
8 | use PhpOffice\PhpSpreadsheet\Spreadsheet; | 12 | use PhpOffice\PhpSpreadsheet\Spreadsheet; |
9 | use PhpOffice\PhpSpreadsheet\Writer\Xlsx; | 13 | use PhpOffice\PhpSpreadsheet\Writer\Xlsx; |
10 | 14 | ||
11 | class PagesController extends Controller | 15 | class PagesController extends Controller |
12 | { | 16 | { |
13 | public function pages(pages $pages) { | 17 | public function pages(pages $pages) { |
14 | $page = pages::query()->where('slug', $pages->slug)->first(); | 18 | $page = pages::query()->where('slug', $pages->slug)->first(); |
15 | 19 | ||
16 | return view('pages', compact('page')); | 20 | return view('pages', compact('page')); |
17 | } | 21 | } |
18 | 22 | ||
23 | public function form_feedback(RequestSendAdmin $request){ | ||
24 | $all = $request->all(); | ||
25 | |||
26 | foreach ([$request->get('email')] as $recipient) { | ||
27 | Mail::to($recipient)->send(new MailAdminy($all)); | ||
28 | } | ||
29 | |||
30 | return redirect()->back()->with('Сообщение было успешно отправлено и будет обработано'); | ||
31 | } | ||
32 | |||
19 | public function redis() { | 33 | public function redis() { |
20 | $redis = Redis::connection(); | 34 | $redis = Redis::connection(); |
21 | $redis->set('User:CompanyName', 'РЕКАМОРЕ'); | 35 | $redis->set('User:CompanyName', 'РЕКАМОРЕ'); |
22 | $id = 1; | 36 | $id = 1; |
23 | //dd(Redis::get('MyVar')); | 37 | //dd(Redis::get('MyVar')); |
24 | $redis->command('rpush', array("Сообщение1")); | 38 | $redis->command('rpush', array("Сообщение1")); |
25 | $redis->command('rpush', array("Сообщение2")); | 39 | $redis->command('rpush', array("Сообщение2")); |
26 | $values = $redis->command('lrange', array("mylist", 0, 1)); | 40 | $values = $redis->command('lrange', array("mylist", 0, 1)); |
27 | dd($values); | 41 | dd($values); |
28 | 42 | ||
29 | } | 43 | } |
30 | 44 | ||
31 | public function excel() { | 45 | public function excel() { |
32 | $spreadsheet = new Spreadsheet(); | 46 | $spreadsheet = new Spreadsheet(); |
33 | $activeWorksheet = $spreadsheet->getActiveSheet(); | 47 | $activeWorksheet = $spreadsheet->getActiveSheet(); |
34 | $activeWorksheet->setCellValue('A1', 'Hello World !'); | 48 | $activeWorksheet->setCellValue('A1', 'Hello World !'); |
35 | 49 | ||
36 | $writer = new Xlsx($spreadsheet); | 50 | $writer = new Xlsx($spreadsheet); |
37 | $writer->save('hello_world.xlsx'); | 51 | $writer->save('hello_world.xlsx'); |
38 | } | 52 | } |
39 | 53 | ||
40 | public function private_policy() { | 54 | public function private_policy() { |
41 | return view('private_policy'); | 55 | return view('private_policy'); |
42 | } | 56 | } |
43 | 57 | ||
44 | public function terms_of_use() { | 58 | public function terms_of_use() { |
45 | return view('terms_of_use'); | 59 | return view('terms_of_use'); |
46 | } | 60 | } |
47 | } | 61 | } |
48 | 62 |
app/Http/Requests/RequestSendAdmin.php
File was created | 1 | <?php | |
2 | |||
3 | namespace App\Http\Requests; | ||
4 | |||
5 | use Illuminate\Foundation\Http\FormRequest; | ||
6 | |||
7 | class RequestSendAdmin extends FormRequest | ||
8 | { | ||
9 | /** | ||
10 | * Determine if the user is authorized to make this request. | ||
11 | * | ||
12 | * @return bool | ||
13 | */ | ||
14 | public function authorize() | ||
15 | { | ||
16 | return true; | ||
17 | } | ||
18 | |||
19 | /** | ||
20 | * Get the validation rules that apply to the request. | ||
21 | * | ||
22 | * @return array<string, mixed> | ||
23 | */ | ||
24 | public function rules() | ||
25 | { | ||
26 | return [ | ||
27 | // | ||
28 | ]; | ||
29 | } | ||
30 | } | ||
31 |
app/Mail/MailAdminy.php
File was created | 1 | <?php | |
2 | |||
3 | namespace App\Mail; | ||
4 | |||
5 | use Illuminate\Bus\Queueable; | ||
6 | use Illuminate\Contracts\Queue\ShouldQueue; | ||
7 | use Illuminate\Mail\Mailable; | ||
8 | use Illuminate\Mail\Mailables\Content; | ||
9 | use Illuminate\Mail\Mailables\Envelope; | ||
10 | use Illuminate\Queue\SerializesModels; | ||
11 | |||
12 | class MailAdminy extends Mailable | ||
13 | { | ||
14 | use Queueable, SerializesModels; | ||
15 | |||
16 | protected $data; | ||
17 | /** | ||
18 | * Create a new message instance. | ||
19 | * | ||
20 | * @return void | ||
21 | */ | ||
22 | public function __construct($data) | ||
23 | { | ||
24 | $this->data = $data; | ||
25 | } | ||
26 | |||
27 | /** | ||
28 | * Get the message envelope. | ||
29 | * | ||
30 | * @return \Illuminate\Mail\Mailables\Envelope | ||
31 | */ | ||
32 | public function envelope() | ||
33 | { | ||
34 | return new Envelope( | ||
35 | subject: 'Mail Adminy', | ||
36 | ); | ||
37 | } | ||
38 | |||
39 | /** | ||
40 | * Get the message content definition. | ||
41 | * | ||
42 | * @return \Illuminate\Mail\Mailables\Content | ||
43 | */ | ||
44 | public function content() | ||
45 | { | ||
46 | return new Content( | ||
47 | view: 'emails.send_adminy', | ||
48 | ); | ||
49 | } | ||
50 | |||
51 | public function build() | ||
52 | { | ||
53 | // Вернуть все данные | ||
54 | return $this->view('emails.send_adminy', ['data' => $this->data]); | ||
55 | } | ||
56 | |||
57 | /** | ||
58 | * Get the attachments for the message. | ||
59 | * | ||
60 | * @return array | ||
61 | */ | ||
62 | public function attachments() | ||
63 | { | ||
64 | return []; | ||
65 | } | ||
66 | } | ||
67 |
public/css/telegram.css
File was created | 1 | .btn_telegram_share { | |
2 | display: inline-block; | ||
3 | text-align: center; | ||
4 | vertical-align: middle; | ||
5 | margin-right: 7px; | ||
6 | padding: 3px 10px; | ||
7 | border: 1px solid #54aaeb; | ||
8 | border-radius: 50px; | ||
9 | background: #54aaeb; | ||
10 | background: -webkit-gradient(linear, left top, left bottom, from(#54aaeb), to(#54aaeb)); | ||
11 | background: -moz-linear-gradient(top, #54aaeb, #54aaeb); | ||
12 | background: linear-gradient(to bottom, #54aaeb, #54aaeb); | ||
13 | font: normal normal normal 16px arial; | ||
14 | color: #ffffff; | ||
15 | text-decoration: none; | ||
16 | } | ||
17 | /*.btn_telegram_share:focus*/ | ||
18 | .btn_telegram_share:hover | ||
19 | { | ||
20 | border: 1px solid #61c4ff; | ||
21 | background: #65ccff; | ||
22 | background: -webkit-gradient(linear, left top, left bottom, from(#65ccff), to(#65ccff)); | ||
23 | background: -moz-linear-gradient(top, #65ccff, #65ccff); | ||
24 | background: linear-gradient(to bottom, #65ccff, #65ccff); | ||
25 | color: #ffffff; | ||
26 | text-decoration: none; | ||
27 | } | ||
28 | .btn_telegram_share:active { | ||
29 | background: #32668d; | ||
30 | background: -webkit-gradient(linear, left top, left bottom, from(#32668d), to(#54aaeb)); | ||
31 | background: -moz-linear-gradient(top, #32668d, #54aaeb); | ||
32 | background: linear-gradient(to bottom, #32668d, #54aaeb); | ||
33 | } | ||
34 | .btn_telegram_share:before{ | ||
35 | content: "\0000a0"; | ||
36 | display: inline-block; | ||
37 | height: 24px; | ||
38 | width: 24px; | ||
39 | line-height: 24px; | ||
40 | margin: 0 4px -6px -4px; | ||
41 | position: relative; | ||
42 | top: 0px; | ||
43 | left: 0px; | ||
44 | background: url("http://Втавляем ссылку на свою картинку.png") no-repeat left center transparent; | ||
45 | background-size: 100% 100%; | ||
46 | } | ||
47 |
resources/views/emails/send_adminy.blade.php
File was created | 1 | <div> | |
2 | Пользователь написал вам: {{ $data['name'] }}<br> | ||
3 | Email: {{ $data['email'] }}<br> | ||
4 | Название компании: {{ $data['name_company'] }} | ||
5 | Телефон: {{ $data['telephone'] }}<br> | ||
6 | Текст сообщения: {{ $data['text'] }}<br> | ||
7 | </div> | ||
8 |
resources/views/employers/list_vacancy.blade.php
1 | @extends('layout.frontend', ['title' => 'Список вакансий - РекаМоре']) | 1 | @extends('layout.frontend', ['title' => 'Список вакансий - РекаМоре']) |
2 | 2 | ||
3 | @section('scripts') | 3 | @section('scripts') |
4 | <script> | 4 | <script> |
5 | console.log('Test system'); | 5 | console.log('Test system'); |
6 | $(document).on('change', '#sort_ajax', function() { | 6 | $(document).on('change', '#sort_ajax', function() { |
7 | var this_ = $(this); | 7 | var this_ = $(this); |
8 | var val_ = this_.val(); | 8 | var val_ = this_.val(); |
9 | console.log('sort items '+val_); | 9 | console.log('sort items '+val_); |
10 | 10 | ||
11 | $.ajax({ | 11 | $.ajax({ |
12 | type: "GET", | 12 | type: "GET", |
13 | url: "{{ route('employer.vacancy_list') }}", | 13 | url: "{{ route('employer.vacancy_list') }}", |
14 | data: "sort="+val_, | 14 | data: "sort="+val_, |
15 | success: function (data) { | 15 | success: function (data) { |
16 | console.log('Выбор сортировки'); | 16 | console.log('Выбор сортировки'); |
17 | console.log(data); | 17 | console.log(data); |
18 | history.pushState({}, '', "{{ route('employer.vacancy_list') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); | 18 | history.pushState({}, '', "{{ route('employer.vacancy_list') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); |
19 | $('#main_ockar').html(data); | 19 | $('#main_ockar').html(data); |
20 | }, | 20 | }, |
21 | headers: { | 21 | headers: { |
22 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 22 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
23 | }, | 23 | }, |
24 | error: function (data) { | 24 | error: function (data) { |
25 | data = JSON.stringify(data); | 25 | data = JSON.stringify(data); |
26 | console.log('Error: ' + data); | 26 | console.log('Error: ' + data); |
27 | } | 27 | } |
28 | }); | 28 | }); |
29 | }); | 29 | }); |
30 | </script> | 30 | </script> |
31 | @endsection | 31 | @endsection |
32 | 32 | ||
33 | @section('content') | 33 | @section('content') |
34 | <section class="cabinet"> | 34 | <section class="cabinet"> |
35 | <div class="container"> | 35 | <div class="container"> |
36 | <ul class="breadcrumbs cabinet__breadcrumbs"> | 36 | <ul class="breadcrumbs cabinet__breadcrumbs"> |
37 | <li><a href="{{ route('index') }}">Главная</a></li> | 37 | <li><a href="{{ route('index') }}">Главная</a></li> |
38 | <li><b>Личный кабинет</b></li> | 38 | <li><b>Личный кабинет</b></li> |
39 | </ul> | 39 | </ul> |
40 | <div class="cabinet__wrapper"> | 40 | <div class="cabinet__wrapper"> |
41 | <div class="cabinet__side"> | 41 | <div class="cabinet__side"> |
42 | <div class="cabinet__side-toper"> | 42 | <div class="cabinet__side-toper"> |
43 | 43 | ||
44 | @include('employers.emblema') | 44 | @include('employers.emblema') |
45 | 45 | ||
46 | </div> | 46 | </div> |
47 | 47 | ||
48 | @include('employers.menu', ['item' => 3]) | 48 | @include('employers.menu', ['item' => 3]) |
49 | </div> | 49 | </div> |
50 | <div class="cabinet__body"> | 50 | <div class="cabinet__body"> |
51 | <div class="cabinet__body-item"> | 51 | <div class="cabinet__body-item"> |
52 | <h2 class="title cabinet__title">Мои вакансии</h2> | 52 | <h2 class="title cabinet__title">Мои вакансии</h2> |
53 | </div> | 53 | </div> |
54 | <div class="cabinet__body-item"> | 54 | <div class="cabinet__body-item"> |
55 | <div class="cabinet__filters"> | 55 | <div class="cabinet__filters"> |
56 | <div class="cabinet__filters-item"> | 56 | <div class="cabinet__filters-item"> |
57 | <form class="search"> | 57 | <form class="search"> |
58 | <input type="search" class="input" placeholder="Поиск…" required> | 58 | <input type="search" class="input" placeholder="Поиск…" required> |
59 | <button type="submit" class="button">Найти</button> | 59 | <button type="submit" class="button">Найти</button> |
60 | <span> | 60 | <span> |
61 | <svg> | 61 | <svg> |
62 | <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> | 62 | <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> |
63 | </svg> | 63 | </svg> |
64 | </span> | 64 | </span> |
65 | </form> | 65 | </form> |
66 | </div> | 66 | </div> |
67 | <div class="cabinet__filters-item"> | 67 | <div class="cabinet__filters-item"> |
68 | <div class="select"> | 68 | <div class="select"> |
69 | <select class="js-select2" id="sort_ajax" name="sort_ajax"> | 69 | <select class="js-select2" id="sort_ajax" name="sort_ajax"> |
70 | <option value="default">Сортировка (по умолчанию)</option> | 70 | <option value="default">Сортировка (по умолчанию)</option> |
71 | <option value="name_up">По имени (возрастание)</option> | 71 | <option value="name_up">По имени (возрастание)</option> |
72 | <option value="name_down">По имени (убывание)</option> | 72 | <option value="name_down">По имени (убывание)</option> |
73 | <option value="created_at_up">По дате (возрастание)</option> | 73 | <option value="created_at_up">По дате (возрастание)</option> |
74 | <option value="created_at_down">По дате (убывание)</option> | 74 | <option value="created_at_down">По дате (убывание)</option> |
75 | </select> | 75 | </select> |
76 | </div> | 76 | </div> |
77 | </div> | 77 | </div> |
78 | </div> | 78 | </div> |
79 | 79 | ||
80 | <div class="table table_spoiler" id="main_ockar" name="main_oskar"> | 80 | <div class="table table_spoiler" id="main_ockar" name="main_oskar"> |
81 | @if ($vacancy_list->count()) | 81 | @if ($vacancy_list->count()) |
82 | <div class="table__scroll"> | 82 | <div class="table__scroll"> |
83 | <div class="table__body table__body_min-width"> | 83 | <div class="table__body table__body_min-width"> |
84 | <table> | 84 | <table> |
85 | <thead> | 85 | <thead> |
86 | <tr> | 86 | <tr> |
87 | <th>№</th> | 87 | <th>№</th> |
88 | <th>Название</th> | 88 | <th>Название</th> |
89 | <th>Дата добавления<br>/ обновления</th> | 89 | <th>Дата добавления<br>/ обновления</th> |
90 | <th>Должности</th> | 90 | <th>Должности</th> |
91 | <th>Статус</th> | 91 | <th>Статус</th> |
92 | <th>Действия</th> | 92 | <th>Действия</th> |
93 | </tr> | 93 | </tr> |
94 | </thead> | 94 | </thead> |
95 | <tbody> | 95 | <tbody> |
96 | @foreach($vacancy_list as $it) | 96 | @foreach($vacancy_list as $it) |
97 | <tr> | 97 | <tr> |
98 | <td>{{ $it->id }}</td> | 98 | <td>{{ $it->id }}</td> |
99 | <td>{{ $it->name }}</td> | 99 | <td>{{ $it->name }}</td> |
100 | <td>{{ date('d.m.Y H:i:s', strtotime($it->created_at)) }} <br>/ {{ date('d.m.Y H:i:s', strtotime($it->updated_at)) }}</td> | 100 | <td>{{ date('d.m.Y H:i:s', strtotime($it->created_at)) }} <br>/ {{ date('d.m.Y H:i:s', strtotime($it->updated_at)) }}</td> |
101 | <td> <a href="{{ route('employer.add_job_in_vac', ['ad_employer' => $it->id]) }}" class="button">Добавить</a> | 101 | <td> <a href="{{ route('employer.add_job_in_vac', ['ad_employer' => $it->id]) }}" class="button">Добавить</a> |
102 | 102 | ||
103 | @if ($it->jobs->count()) | 103 | @if ($it->jobs->count()) |
104 | @foreach ($it->jobs as $key => $it_um) | 104 | @foreach ($it->jobs as $key => $it_um) |
105 | <p>@if (isset($it->jobs_code[$key])) | 105 | <p>@if (isset($it->jobs_code[$key])) |
106 | <a href="{{ route('employer.edit_job_in_vac', ['ad_job' => $it->jobs_code[$key]->id, 'ad_employer' => $it->id, 'job_title_id' => $it_um->id]) }}" style="text-decoration: underline">{{$it_um->name}}</a> | 106 | <a href="{{ route('employer.edit_job_in_vac', ['ad_job' => $it->jobs_code[$key]->id, 'ad_employer' => $it->id, 'job_title_id' => $it_um->id]) }}" style="text-decoration: underline">{{$it_um->name}}</a> |
107 | <a href="{{ route('employer.delete_job_in_vac', ['ad_job' => $it->jobs_code[$key]->id]) }}" style="text-decoration: underline">(Del)</a> | 107 | <a href="{{ route('employer.delete_job_in_vac', ['ad_job' => $it->jobs_code[$key]->id]) }}" style="text-decoration: underline">(Del)</a> |
108 | @endif | 108 | @endif |
109 | </p> | 109 | </p> |
110 | @endforeach | 110 | @endforeach |
111 | @else | 111 | @else |
112 | Нет связанных <br> с вакансией должностей | 112 | Нет связанных <br> с вакансией должностей |
113 | @endif | 113 | @endif |
114 | </td> | 114 | </td> |
115 | <td> | 115 | <td> |
116 | @if ($it->active_is) | 116 | @if ($it->active_is) |
117 | <span class="table__status green"><i></i>Опубликовано</span> | 117 | <span class="table__status green"><i></i>Опубликовано</span> |
118 | @else | 118 | @else |
119 | <span class="table__status"><i></i>Не опубликовано</span> | 119 | <span class="table__status"><i></i>Не опубликовано</span> |
120 | @endif | 120 | @endif |
121 | </td> | 121 | </td> |
122 | <td> | 122 | <td> |
123 | <span class="table__controls"> | 123 | <span class="table__controls"> |
124 | <a class="table__controls-item up-it" href="{{ route('employer.vacancy_up', ['ad_employer' => $it->id]) }}"> | 124 | <a class="table__controls-item up-it" href="{{ route('employer.vacancy_up', ['ad_employer' => $it->id]) }}"> |
125 | <svg> | 125 | <svg> |
126 | <use xlink:href="{{ asset('images/sprite.svg#arrow-radius') }}"></use> | 126 | <use xlink:href="{{ asset('images/sprite.svg#arrow-radius') }}"></use> |
127 | </svg> | 127 | </svg> |
128 | </a> | 128 | </a> |
129 | <a href="{{ route('employer.vacancy_edit', ['ad_employer' => $it->id]) }}" class="table__controls-item"> | 129 | <a href="{{ route('employer.vacancy_edit', ['ad_employer' => $it->id]) }}" class="table__controls-item"> |
130 | <svg> | 130 | <svg> |
131 | <use xlink:href="{{ asset('images/sprite.svg#pencil') }}"></use> | 131 | <use xlink:href="{{ asset('images/sprite.svg#pencil') }}"></use> |
132 | </svg> | 132 | </svg> |
133 | </a> | 133 | </a> |
134 | <a class="table__controls-item" href="{{ route('employer.vacancy_delete', ['ad_employer' => $it->id]) }}"> | 134 | <a class="table__controls-item" href="{{ route('employer.vacancy_delete', ['ad_employer' => $it->id]) }}"> |
135 | <svg> | 135 | <svg> |
136 | <use xlink:href="{{ asset('images/sprite.svg#cross') }}"></use> | 136 | <use xlink:href="{{ asset('images/sprite.svg#cross') }}"></use> |
137 | </svg> | 137 | </svg> |
138 | </a> | 138 | </a> |
139 | @if ($it->active_is) | 139 | @if ($it->active_is) |
140 | <a href="{{ route('employer.vacancy_eye', ['ad_employer' => $it->id, 'status' => 0]) }}" class="table__controls-item"> | 140 | <a href="{{ route('employer.vacancy_eye', ['ad_employer' => $it->id, 'status' => 0]) }}" class="table__controls-item"> |
141 | <svg> | 141 | <svg> |
142 | <use xlink:href="{{ asset('images/sprite.svg#eye') }}"></use> | 142 | <use xlink:href="{{ asset('images/sprite.svg#eye') }}"></use> |
143 | </svg> | 143 | </svg> |
144 | </a> | 144 | </a> |
145 | @else | 145 | @else |
146 | <a href="{{ route('employer.vacancy_eye', ['ad_employer' => $it->id, 'status' => 1]) }}" class="table__controls-item"> | 146 | <a href="{{ route('employer.vacancy_eye', ['ad_employer' => $it->id, 'status' => 1]) }}" class="table__controls-item"> |
147 | <svg> | 147 | <svg> |
148 | <use xlink:href="{{ asset('images/sprite.svg#eye-3') }}"></use> | 148 | <use xlink:href="{{ asset('images/sprite.svg#eye-3') }}"></use> |
149 | </svg> | 149 | </svg> |
150 | </a> | 150 | </a> |
151 | @endif | 151 | @endif |
152 | <!--<a class="btn_telegram_share table__controls-item" href="https://telegram.me/share/url?url=ВАШ_URL&text={{ $it->name }}"> | ||
153 | <svg> | ||
154 | <use xlink:href=" asset('images/sprite.svg#arrow-radius') }}"></use> | ||
155 | </svg> | ||
156 | </a>--> | ||
152 | 157 | ||
153 | <!--<button type="button" class="table__controls-item"> | 158 | <!--<button type="button" class="table__controls-item"> |
154 | <svg> | 159 | <svg> |
155 | <use xlink:href=" asset('images/sprite.svg#tg') }}"></use> | 160 | <use xlink:href=" asset('images/sprite.svg#tg') }}"></use> |
156 | </svg> | 161 | </svg> |
157 | </button> | 162 | </button> |
158 | --> | 163 | --> |
159 | </span> | 164 | </span> |
160 | </td> | 165 | </td> |
161 | </tr> | 166 | </tr> |
162 | @endforeach | 167 | @endforeach |
163 | </tbody> | 168 | </tbody> |
164 | </table> | 169 | </table> |
165 | </div><br> | 170 | </div><br> |
166 | {{ $vacancy_list->appends($_GET)->links('paginate') }} | 171 | {{ $vacancy_list->appends($_GET)->links('paginate') }} |
167 | </div> | 172 | </div> |
168 | 173 | ||
169 | 174 | ||
170 | @else | 175 | @else |
171 | 176 | ||
172 | <div class="notify"> | 177 | <div class="notify"> |
173 | <svg> | 178 | <svg> |
174 | <use xlink:href="{{ asset('images/sprite.svg#i') }}"></use> | 179 | <use xlink:href="{{ asset('images/sprite.svg#i') }}"></use> |
175 | </svg> | 180 | </svg> |
176 | <span>Вы ещё не разместили ни одной вакансии</span> | 181 | <span>Вы ещё не разместили ни одной вакансии</span> |
177 | </div> | 182 | </div> |
178 | @endif | 183 | @endif |
179 | </div> | 184 | </div> |
180 | </div> | 185 | </div> |
181 | </div> | 186 | </div> |
182 | </div> | 187 | </div> |
183 | </div> | 188 | </div> |
184 | </section> | 189 | </section> |
185 | </div> | 190 | </div> |
186 | @endsection | 191 | @endsection |
187 | 192 |
resources/views/employers/send_all_danger.blade.php
File was created | 1 | @extends('layout.frontend', ['title' => 'База данных - РекаМоре']) | |
2 | |||
3 | @section('scripts') | ||
4 | <script> | ||
5 | console.log('Test system'); | ||
6 | $(document).on('click', '.die_black', function() { | ||
7 | var this_ = $(this); | ||
8 | var ajax_ = $('#ajax_flot_div'); | ||
9 | var id_ = this_.attr('data-test'); | ||
10 | var url_ = this_.attr('data-link'); | ||
11 | |||
12 | console.log(url_); | ||
13 | $.ajax({ | ||
14 | type: "GET", | ||
15 | url: url_, | ||
16 | success: function (data) { | ||
17 | console.log('Ответка'); | ||
18 | ajax_.html(data); | ||
19 | }, | ||
20 | headers: { | ||
21 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | ||
22 | }, | ||
23 | error: function (data) { | ||
24 | console.log('Error: ' + data); | ||
25 | } | ||
26 | }); | ||
27 | }); | ||
28 | </script> | ||
29 | @endsection | ||
30 | |||
31 | @section('content') | ||
32 | <section class="cabinet"> | ||
33 | <div class="container"> | ||
34 | <ul class="breadcrumbs cabinet__breadcrumbs"> | ||
35 | <li><a href="{{ route('index') }}">Главная</a></li> | ||
36 | <li><b>Личный кабинет</b></li> | ||
37 | </ul> | ||
38 | <div class="cabinet__wrapper"> | ||
39 | <div class="cabinet__side"> | ||
40 | <div class="cabinet__side-toper"> | ||
41 | @include('employers.emblema') | ||
42 | </div> | ||
43 | @include('employers.menu', ['item' => 8]) | ||
44 | </div> | ||
45 | <div class="cabinet__body"> | ||
46 | <div class="cabinet__body-item"> | ||
47 | <h2 class="title cabinet__title">Рассылка сообщений</h2> | ||
48 | </div> | ||
49 | <div class="cabinet__body-item"> | ||
50 | <div class="cabinet__table-header"> | ||
51 | <div><!--_if (isset($it->workers[0]->job_titles[0]->name)) _ $it->workers[0]->job_titles[0]->name }}_else Не указано _endif--> | ||
52 | Данные нельзя просмотреть, прочтите инструкцию | ||
53 | <a style="text-decoration:underline" href="{{ route('page', ['pages' => 'Usloviya-razmescheniya']) }}">Условия размещения</a> | ||
54 | </div> | ||
55 | </div> | ||
56 | </div> | ||
57 | </div> | ||
58 | </section> | ||
59 | </div> | ||
60 | @endsection | ||
61 |
resources/views/layout/frontend.blade.php
1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
2 | <html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> | 2 | <html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> |
3 | 3 | ||
4 | <head> | 4 | <head> |
5 | <meta charset="utf-8"> | 5 | <meta charset="utf-8"> |
6 | <title>{{ $title }}</title> | 6 | <title>{{ $title }}</title> |
7 | <meta name="viewport" content="width=device-width,initial-scale=1"> | 7 | <meta name="viewport" content="width=device-width,initial-scale=1"> |
8 | <meta name="theme-color" content="#377D87"> | 8 | <meta name="theme-color" content="#377D87"> |
9 | <script src="{{ asset('js/jquery.js') }}"></script> | 9 | <script src="{{ asset('js/jquery.js') }}"></script> |
10 | <!--<script type="text/javascript" src=" asset('js/jquery.cookie.js') }}"></script>--> | 10 | <!--<script type="text/javascript" src=" asset('js/jquery.cookie.js') }}"></script>--> |
11 | <link rel="stylesheet" href="{{ asset('css/telegram.css') }}"> | ||
11 | <link rel="stylesheet" href="{{ asset('css/star-rating.min.css') }}"> | 12 | <link rel="stylesheet" href="{{ asset('css/star-rating.min.css') }}"> |
12 | <link rel="stylesheet" href="{{ asset('css/style.css') }}"> | 13 | <link rel="stylesheet" href="{{ asset('css/style.css') }}"> |
13 | <style> | 14 | <style> |
14 | .err_red { | 15 | .err_red { |
15 | border: red 2px solid; | 16 | border: red 2px solid; |
16 | } | 17 | } |
17 | </style> | 18 | </style> |
18 | </head> | 19 | </head> |
19 | 20 | ||
20 | <body id="body" onload="createCaptcha()"> | 21 | <body id="body" onload="createCaptcha()"> |
21 | <a href="#body" class="to-top js-scroll-to"> | 22 | <a href="#body" class="to-top js-scroll-to"> |
22 | <svg> | 23 | <svg> |
23 | <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> | 24 | <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> |
24 | </svg> | 25 | </svg> |
25 | </a> | 26 | </a> |
26 | 27 | ||
27 | <div> <!-- BEGIN TOP WRAPPER --> | 28 | <div> <!-- BEGIN TOP WRAPPER --> |
28 | <header class="header"> | 29 | <header class="header"> |
29 | <div class="container"> | 30 | <div class="container"> |
30 | <div class="header__body"> | 31 | <div class="header__body"> |
31 | <div class="header__left"> | 32 | <div class="header__left"> |
32 | <a href="{{ route('index') }}" class="header__logo"> | 33 | <a href="{{ route('index') }}" class="header__logo"> |
33 | <svg> | 34 | <svg> |
34 | <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> | 35 | <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> |
35 | </svg> | 36 | </svg> |
36 | </a> | 37 | </a> |
37 | <nav class="header__menu"> | 38 | <nav class="header__menu"> |
38 | <a href="{{ route('vacancies') }}" class="header__menu-item">Вакансии</a> | 39 | <a href="{{ route('vacancies') }}" class="header__menu-item">Вакансии</a> |
39 | <a href="{{ route('shipping_companies') }}" class="header__menu-item">Судоходные компании</a> | 40 | <a href="{{ route('shipping_companies') }}" class="header__menu-item">Судоходные компании</a> |
40 | <a href="{{ route('education') }}" class="header__menu-item">Образование</a> | 41 | <a href="{{ route('education') }}" class="header__menu-item">Образование</a> |
41 | </nav> | 42 | </nav> |
42 | </div> | 43 | </div> |
43 | <div class="header__right"> | 44 | <div class="header__right"> |
44 | @guest | 45 | @guest |
45 | 46 | ||
46 | @else | 47 | @else |
47 | <a href="@if ($UserId->is_worker) {{ route('worker.cabinet') }} @else {{ route('employer.cabinet') }} @endif" class="header__notifs header__notifs_actived"> | 48 | <a href="@if ($UserId->is_worker) {{ route('worker.cabinet') }} @else {{ route('employer.cabinet') }} @endif" class="header__notifs header__notifs_actived"> |
48 | <svg> | 49 | <svg> |
49 | <use xlink:href="{{ asset('images/sprite.svg#ring') }}"></use> | 50 | <use xlink:href="{{ asset('images/sprite.svg#ring') }}"></use> |
50 | </svg> | 51 | </svg> |
51 | <span>Уведомления</span> | 52 | <span>Уведомления</span> |
52 | </a> | 53 | </a> |
53 | 54 | ||
54 | @endguest | 55 | @endguest |
55 | <div class="header__right-line"></div> | 56 | <div class="header__right-line"></div> |
56 | <button class="header__burger"> | 57 | <button class="header__burger"> |
57 | <svg> | 58 | <svg> |
58 | <use xlink:href="{{ asset('images/sprite.svg#burger') }}"></use> | 59 | <use xlink:href="{{ asset('images/sprite.svg#burger') }}"></use> |
59 | </svg> | 60 | </svg> |
60 | </button> | 61 | </button> |
61 | @guest | 62 | @guest |
62 | <a class="button header__sign" data-fancybox data-src="#sign" data-options='{"touch":false,"autoFocus":false}'>Войти</a> | 63 | <a class="button header__sign" data-fancybox data-src="#sign" data-options='{"touch":false,"autoFocus":false}'>Войти</a> |
63 | @else | 64 | @else |
64 | <a class="button header__sign" href="{{ route('logout') }}">Выйти</a> | 65 | <a class="button header__sign" href="{{ route('logout') }}">Выйти</a> |
65 | @endguest | 66 | @endguest |
66 | </div> | 67 | </div> |
67 | </div> | 68 | </div> |
68 | </div> | 69 | </div> |
69 | </header> | 70 | </header> |
70 | 71 | ||
71 | @yield('content') | 72 | @yield('content') |
72 | </div> <!-- END TOP WRAPPER --> | 73 | </div> <!-- END TOP WRAPPER --> |
73 | 74 | ||
74 | <div> <!-- BEGIN BOTTOM WRAPPER --> | 75 | <div> <!-- BEGIN BOTTOM WRAPPER --> |
75 | <footer class="footer"> | 76 | <footer class="footer"> |
76 | <div class="container"> | 77 | <div class="container"> |
77 | <div class="footer__mobile"> | 78 | <div class="footer__mobile"> |
78 | 79 | ||
79 | <button class="footer__mobile-toper js-toggle active"> | 80 | <button class="footer__mobile-toper js-toggle active"> |
80 | <a href="{{ route('index') }}"> | 81 | <a href="{{ route('index') }}"> |
81 | <svg> | 82 | <svg> |
82 | <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> | 83 | <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> |
83 | </svg> | 84 | </svg> |
84 | </a> | 85 | </a> |
85 | <span> | 86 | <span> |
86 | <svg> | 87 | <svg> |
87 | <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> | 88 | <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> |
88 | </svg> | 89 | </svg> |
89 | </span> | 90 | </span> |
90 | </button> | 91 | </button> |
91 | <div class="footer__mobile-menu"> | 92 | <div class="footer__mobile-menu"> |
92 | <div class="footer__mobile-menu-item"> | 93 | <div class="footer__mobile-menu-item"> |
93 | <button class="js-toggle"> | 94 | <button class="js-toggle"> |
94 | <b>Соискателям</b> | 95 | <b>Соискателям</b> |
95 | <span><svg> | 96 | <span><svg> |
96 | <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> | 97 | <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> |
97 | </svg></span> | 98 | </svg></span> |
98 | </button> | 99 | </button> |
99 | <div> | 100 | <div> |
100 | <a href="{{ route('vacancies') }}">Вакансии</a> | 101 | <a href="{{ route('vacancies') }}">Вакансии</a> |
101 | <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a> | 102 | <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a> |
102 | <a href="{{ route('education') }}">Образование</a> | 103 | <a href="{{ route('education') }}">Образование</a> |
103 | <a href="{{ route('news') }}">Новости</a> | 104 | <a href="{{ route('news') }}">Новости</a> |
104 | <a href="{{ route('contacts') }}">Контакты</a> | 105 | <a href="{{ route('contacts') }}">Контакты</a> |
105 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a> | 106 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a> |
106 | </div> | 107 | </div> |
107 | </div> | 108 | </div> |
108 | <div class="footer__mobile-menu-item"> | 109 | <div class="footer__mobile-menu-item"> |
109 | <button class="js-toggle"> | 110 | <button class="js-toggle"> |
110 | <b>Работодателям</b> | 111 | <b>Работодателям</b> |
111 | <span><svg> | 112 | <span><svg> |
112 | <use xlink:href="{{asset('images/sprite.svg#arrow-top') }}"></use> | 113 | <use xlink:href="{{asset('images/sprite.svg#arrow-top') }}"></use> |
113 | </svg></span> | 114 | </svg></span> |
114 | </button> | 115 | </button> |
115 | <div> | 116 | <div> |
116 | <a href="{{ route('register') }}">Регистрация</a> | 117 | <a href="{{ route('register') }}">Регистрация</a> |
117 | <a href="{{ route('bd_resume') }}">База резюме</a> | 118 | <a href="{{ route('bd_resume') }}">База резюме</a> |
118 | <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a> | 119 | <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a> |
119 | <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a> | 120 | <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a> |
120 | <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a> | 121 | <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a> |
121 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a> | 122 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a> |
122 | </div> | 123 | </div> |
123 | </div> | 124 | </div> |
124 | </div> | 125 | </div> |
125 | <div class="footer__mobile-contacts"> | 126 | <div class="footer__mobile-contacts"> |
126 | <b>Контакты</b> | 127 | <b>Контакты</b> |
127 | <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a> | 128 | <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a> |
128 | <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a> | 129 | <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a> |
129 | </div> | 130 | </div> |
130 | <div class="footer__mobile-bottom"> | 131 | <div class="footer__mobile-bottom"> |
131 | <div class="socials"> | 132 | <div class="socials"> |
132 | <a href="{{ $companies[0]->vkontact }}" target="_blank"> | 133 | <a href="{{ $companies[0]->vkontact }}" target="_blank"> |
133 | <svg> | 134 | <svg> |
134 | <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> | 135 | <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> |
135 | </svg> | 136 | </svg> |
136 | </a> | 137 | </a> |
137 | <a href="{{ $companies[0]->telegram }}" target="_blank"> | 138 | <a href="{{ $companies[0]->telegram }}" target="_blank"> |
138 | <svg> | 139 | <svg> |
139 | <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> | 140 | <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> |
140 | </svg> | 141 | </svg> |
141 | </a> | 142 | </a> |
142 | </div> | 143 | </div> |
143 | <nav class="footer__mobile-links"> | 144 | <nav class="footer__mobile-links"> |
144 | <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a> | 145 | <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a> |
145 | <span></span> | 146 | <span></span> |
146 | <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a> | 147 | <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a> |
147 | </nav> | 148 | </nav> |
148 | © 2023 — RekaMore.su | 149 | © 2023 — RekaMore.su |
149 | <a href="{{ route('index') }}" class="nls" target="_blank"> | 150 | <a href="{{ route('index') }}" class="nls" target="_blank"> |
150 | <svg> | 151 | <svg> |
151 | <use xlink:href="{{ asset('images/sprite.svg#nls') }}"></use> | 152 | <use xlink:href="{{ asset('images/sprite.svg#nls') }}"></use> |
152 | </svg> | 153 | </svg> |
153 | <span> | 154 | <span> |
154 | Дизайн и разработка: | 155 | Дизайн и разработка: |
155 | <b>NoLogoStudio.ru</b> | 156 | <b>NoLogoStudio.ru</b> |
156 | </span> | 157 | </span> |
157 | </a> | 158 | </a> |
158 | </div> | 159 | </div> |
159 | </div> | 160 | </div> |
160 | <div class="footer__main"> | 161 | <div class="footer__main"> |
161 | <div class="footer__main-body"> | 162 | <div class="footer__main-body"> |
162 | 163 | ||
163 | <a href="" class="footer__main-logo"> | 164 | <a href="" class="footer__main-logo"> |
164 | <svg> | 165 | <svg> |
165 | <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> | 166 | <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> |
166 | </svg> | 167 | </svg> |
167 | </a> | 168 | </a> |
168 | <div class="footer__main-col"> | 169 | <div class="footer__main-col"> |
169 | <div class="footer__main-title">Соискателям</div> | 170 | <div class="footer__main-title">Соискателям</div> |
170 | <nav> | 171 | <nav> |
171 | <a href="{{ route('vacancies') }}">Вакансии</a> | 172 | <a href="{{ route('vacancies') }}">Вакансии</a> |
172 | <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a> | 173 | <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a> |
173 | <a href="{{ route('education') }}">Образование</a> | 174 | <a href="{{ route('education') }}">Образование</a> |
174 | <a href="{{ route('news') }}">Новости</a> | 175 | <a href="{{ route('news') }}">Новости</a> |
175 | <a href="{{ route('contacts') }}">Контакты</a> | 176 | <a href="{{ route('contacts') }}">Контакты</a> |
176 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a> | 177 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a> |
177 | </nav> | 178 | </nav> |
178 | </div> | 179 | </div> |
179 | <div class="footer__main-col"> | 180 | <div class="footer__main-col"> |
180 | <div class="footer__main-title">Работодателям</div> | 181 | <div class="footer__main-title">Работодателям</div> |
181 | <nav> | 182 | <nav> |
182 | <a href="{{ route('register') }}">Регистрация</a> | 183 | <a href="{{ route('register') }}">Регистрация</a> |
183 | <a href="{{ route('bd_resume') }}">База резюме</a> | 184 | <a href="{{ route('bd_resume') }}">База резюме</a> |
184 | <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a> | 185 | <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a> |
185 | <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a> | 186 | <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a> |
186 | <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a> | 187 | <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a> |
187 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a> | 188 | <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a> |
188 | </nav> | 189 | </nav> |
189 | </div> | 190 | </div> |
190 | 191 | ||
191 | <div class="footer__main-col"> | 192 | <div class="footer__main-col"> |
192 | <div class="footer__main-title">Контакты</div> | 193 | <div class="footer__main-title">Контакты</div> |
193 | <div class="footer__main-contacts"> | 194 | <div class="footer__main-contacts"> |
194 | <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a> | 195 | <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a> |
195 | <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a> | 196 | <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a> |
196 | </div> | 197 | </div> |
197 | <div class="socials"> | 198 | <div class="socials"> |
198 | <a href="{{ $companies[0]->vkontact }}" target="_blank"> | 199 | <a href="{{ $companies[0]->vkontact }}" target="_blank"> |
199 | <svg> | 200 | <svg> |
200 | <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> | 201 | <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> |
201 | </svg> | 202 | </svg> |
202 | </a> | 203 | </a> |
203 | <a href="{{ $companies[0]->telegram }}" target="_blank"> | 204 | <a href="{{ $companies[0]->telegram }}" target="_blank"> |
204 | <svg> | 205 | <svg> |
205 | <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> | 206 | <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> |
206 | </svg> | 207 | </svg> |
207 | </a> | 208 | </a> |
208 | </div> | 209 | </div> |
209 | </div> | 210 | </div> |
210 | </div> | 211 | </div> |
211 | 212 | ||
212 | <div class="footer__main-copy"> | 213 | <div class="footer__main-copy"> |
213 | <div>© 2023 — RekaMore.su</div> | 214 | <div>© 2023 — RekaMore.su</div> |
214 | <nav> | 215 | <nav> |
215 | <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a> | 216 | <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a> |
216 | <span></span> | 217 | <span></span> |
217 | <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a> | 218 | <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a> |
218 | </nav> | 219 | </nav> |
219 | <div> @if (isset($_COOKIE['favorite_vacancy'])) Куки вакансий: {{ print_r($_COOKIE['favorite_vacancy']) }} @endif</div> | 220 | <div> @if (isset($_COOKIE['favorite_vacancy'])) Куки вакансий: {{ print_r($_COOKIE['favorite_vacancy']) }} @endif</div> |
220 | <a href="{{ route('index') }}" class="nls" target="_blank"> | 221 | <a href="{{ route('index') }}" class="nls" target="_blank"> |
221 | <svg> | 222 | <svg> |
222 | <use xlink:href="{{ asset('images/sprite.svg#nls') }}"></use> | 223 | <use xlink:href="{{ asset('images/sprite.svg#nls') }}"></use> |
223 | </svg> | 224 | </svg> |
224 | <span> | 225 | <span> |
225 | Дизайн и разработка: | 226 | Дизайн и разработка: |
226 | <b>NoLogoStudio.ru</b> | 227 | <b>NoLogoStudio.ru</b> |
227 | </span> | 228 | </span> |
228 | </a> | 229 | </a> |
229 | </div> | 230 | </div> |
230 | </div> | 231 | </div> |
231 | </div> | 232 | </div> |
232 | </footer> | 233 | </footer> |
233 | </div> <!-- END BOTTOM WRAPPER --> | 234 | </div> <!-- END BOTTOM WRAPPER --> |
234 | 235 | ||
235 | <div hidden> <!-- BEGIN MODALS WRAPPER --> | 236 | <div hidden> <!-- BEGIN MODALS WRAPPER --> |
236 | <!-- Соискатель отправляет сообщение работодателю --> | 237 | <!-- Соискатель отправляет сообщение работодателю --> |
237 | @include('modals.send_worker_new') | 238 | @include('modals.send_worker_new') |
238 | 239 | ||
239 | <!-- Работодатель отправляет сообщение соискателю --> | 240 | <!-- Работодатель отправляет сообщение соискателю --> |
240 | @include('modals.send_employer') | 241 | @include('modals.send_employer') |
241 | 242 | ||
242 | <!-- Сообщение-предупреждение о том, что сообщения только можно отправить авторизованным пользователям --> | 243 | <!-- Сообщение-предупреждение о том, что сообщения только можно отправить авторизованным пользователям --> |
243 | @include('modals.send_message_noaut') | 244 | @include('modals.send_message_noaut') |
244 | 245 | ||
245 | @include('modals.send_message_noaut2') | 246 | @include('modals.send_message_noaut2') |
246 | 247 | ||
247 | <!-- Форма авторизации --> | 248 | <!-- Форма авторизации --> |
248 | @include('modals.send_login') | 249 | @include('modals.send_login') |
249 | 250 | ||
250 | <!-- Сбросить пароль --> | 251 | <!-- Сбросить пароль --> |
251 | @include('modals.reset_password') | 252 | @include('modals.reset_password') |
252 | 253 | ||
253 | <!-- Регистрация --> | 254 | <!-- Регистрация --> |
254 | @include('modals.register') | 255 | @include('modals.register') |
255 | 256 | ||
256 | <!-- Благодарность по отправке сообщения работодателю --> | 257 | <!-- Благодарность по отправке сообщения работодателю --> |
257 | @include('modals.thank_you_send_employer') | 258 | @include('modals.thank_you_send_employer') |
258 | 259 | ||
259 | <!-- Благодарность по отправке сообщения менеджеру --> | 260 | <!-- Благодарность по отправке сообщения менеджеру --> |
260 | @include('modals.thank_you_send_manager') | 261 | @include('modals.thank_you_send_manager') |
261 | 262 | ||
262 | <!-- Благодарность после регистрации --> | 263 | <!-- Благодарность после регистрации --> |
263 | @include('modals.thank_you_send_for_employer') | 264 | @include('modals.thank_you_send_for_employer') |
264 | 265 | ||
265 | <!-- Благодарность после регистрации для работника --> | 266 | <!-- Благодарность после регистрации для работника --> |
266 | @include('modals.thank_you_send_for_worker') | 267 | @include('modals.thank_you_send_for_worker') |
267 | 268 | ||
268 | <!-- Подтверждение удаления профиля --> | 269 | <!-- Подтверждение удаления профиля --> |
269 | @include('modals.delete_profile') | 270 | @include('modals.delete_profile') |
270 | 271 | ||
271 | <!-- Подверждение об удалении профиля --> | 272 | <!-- Подверждение об удалении профиля --> |
272 | @include('modals.success_delete_profile') | 273 | @include('modals.success_delete_profile') |
273 | 274 | ||
274 | </div> <!-- END MODALS WRAPPER --> | 275 | </div> <!-- END MODALS WRAPPER --> |
275 | 276 | ||
276 | 277 | ||
277 | <script src="{{ asset('js/jquery.maskedinput.js') }}"></script> | 278 | <script src="{{ asset('js/jquery.maskedinput.js') }}"></script> |
278 | <script src="{{ asset('js/jquery.fancybox.js') }}"></script> | 279 | <script src="{{ asset('js/jquery.fancybox.js') }}"></script> |
279 | <script src="{{ asset('js/jquery.select2.js') }}"></script> | 280 | <script src="{{ asset('js/jquery.select2.js') }}"></script> |
280 | <script src="{{ asset('js/swiper.js') }}"></script> | 281 | <script src="{{ asset('js/swiper.js') }}"></script> |
281 | <script src="{{ asset('js/script-vc.js') }}"></script> | 282 | <script src="{{ asset('js/script-vc.js') }}"></script> |
282 | <script src="{{ asset('js/star-rating.min.js') }}"></script> | 283 | <script src="{{ asset('js/star-rating.min.js') }}"></script> |
283 | <script> | 284 | <script> |
284 | var getUrlParameter = function getUrlParameter(sParam) { | 285 | var getUrlParameter = function getUrlParameter(sParam) { |
285 | var sPageURL = decodeURIComponent(window.location.search.substring(1)), | 286 | var sPageURL = decodeURIComponent(window.location.search.substring(1)), |
286 | sURLVariables = sPageURL.split('&'), | 287 | sURLVariables = sPageURL.split('&'), |
287 | sParameterName, | 288 | sParameterName, |
288 | i; | 289 | i; |
289 | for (i = 0; i < sURLVariables.length; i++) { | 290 | for (i = 0; i < sURLVariables.length; i++) { |
290 | sParameterName = sURLVariables[i].split('='); | 291 | sParameterName = sURLVariables[i].split('='); |
291 | if (sParameterName[0] === sParam) { | 292 | if (sParameterName[0] === sParam) { |
292 | return sParameterName[1] === undefined ? true : sParameterName[1]; | 293 | return sParameterName[1] === undefined ? true : sParameterName[1]; |
293 | } | 294 | } |
294 | } | 295 | } |
295 | }; | 296 | }; |
296 | </script> | 297 | </script> |
297 | @include('js.modals') | 298 | @include('js.modals') |
298 | @include('js.captha') | 299 | @include('js.captha') |
299 | @yield('scripts') | 300 | @yield('scripts') |
300 | </body> | 301 | </body> |
301 | </html> | 302 | </html> |
302 | 303 |
resources/views/pages.blade.php
1 | @extends('layout.frontend', ['title' => $page->name.'- РекаМоре']) | 1 | @extends('layout.frontend', ['title' => $page->name.'- РекаМоре']) |
2 | 2 | ||
3 | @section('scripts') | 3 | @section('scripts') |
4 | @endsection | 4 | @endsection |
5 | 5 | ||
6 | @section('content') | 6 | @section('content') |
7 | <section class="thing"> | 7 | <section class="thing"> |
8 | <div class="container"> | 8 | <div class="container"> |
9 | <div class="thing__body"> | 9 | <div class="thing__body"> |
10 | <ul class="breadcrumbs thing__breadcrumbs"> | 10 | <ul class="breadcrumbs thing__breadcrumbs"> |
11 | <li><a href="{{ route('index') }}">Главная</a></li> | 11 | <li><a href="{{ route('index') }}">Главная</a></li> |
12 | <li><b>{{ $page->name }}</b></li> | 12 | <li><b>{{ $page->name }}</b></li> |
13 | </ul> | 13 | </ul> |
14 | @isset($page->image) | 14 | @isset($page->image) |
15 | <img src=" {{ asset(Storage::url($page->image)) }}" alt="" class="thing__pic thing__pic_two"> | 15 | <img src=" {{ asset(Storage::url($page->image)) }}" alt="" class="thing__pic thing__pic_two"> |
16 | @endif | 16 | @endif |
17 | <h1 class="thing__title">{{ $page->name }}</h1> | 17 | <h1 class="thing__title">{{ $page->name }}</h1> |
18 | <p class="thing__text">{!! $page->anons !!}</p> | 18 | <p class="thing__text">{!! $page->anons !!}</p> |
19 | </div> | 19 | </div> |
20 | </div> | 20 | </div> |
21 | </section> | 21 | </section> |
22 | @if ($page->slug !== 'Usloviya-razmescheniya') | ||
22 | <main class="main"> | 23 | <main class="main"> |
23 | <div class="container"> | 24 | <div class="container"> |
24 | <div class="main__content"> | 25 | <div class="main__content"> |
25 | <div class="main__content-item"> | 26 | <div class="main__content-item"> |
26 | {!! $page->text !!} | 27 | {!! $page->text !!} |
27 | </div> | 28 | </div> |
28 | </div> | 29 | </div> |
29 | </div> | 30 | </div> |
30 | </main> | 31 | </main> |
32 | @else | ||
33 | <main class="main"> | ||
34 | <div class="container"> | ||
35 | <div class="main__cond"> | ||
36 | <div class="main__cond-label"> | ||
37 | На рынке мы с 2020 года. | ||
38 | <br>Мы молодая компания, которой важно сделать хороший и востребованный продукт! | ||
39 | </div> | ||
40 | <div> | ||
41 | <h3>За это время нам удалось:</h3> | ||
42 | <ul class="main__cond-icons"> | ||
43 | <li> | ||
44 | <span><img src="{{ asset('images/svg/1.svg') }}" alt=""></span> | ||
45 | Создать самое крупное сообщество Вконтакте по поиску работы на речноми морском флоте | ||
46 | </li> | ||
47 | <li> | ||
48 | <span><img src="{{ asset('images/svg/2.svg') }}" alt=""></span> | ||
49 | Создать самый крупный телеграм канал по поиску работы на речноми морском флоте | ||
50 | </li> | ||
51 | <li> | ||
52 | <span><img src="{{ asset('images/svg/3.svg') }}" alt=""></span> | ||
53 | Создать действительно эффективную и удобную базу анкет | ||
54 | </li> | ||
55 | <li> | ||
56 | <span><img src="{{ asset('images/svg/4.svg') }}" alt=""></span> | ||
57 | Разместить свою рекламу во многих учебных заведениях нашей страны. Колледжи,вузы, утц, медицинские центры охотно размещают нашу рекламу в своих заведениях | ||
58 | </li> | ||
59 | <li> | ||
60 | <span><img src="{{ asset('images/svg/5.svg') }}" alt=""></span> | ||
61 | Подключить к нашему сервису более 120 судоходных компаний России | ||
62 | </li> | ||
63 | <li> | ||
64 | <span><img src="{{ asset('images/svg/6.svg') }}" alt=""></span> | ||
65 | Оправдать доверие и ожидание, так как компании заключившие с нами договорв первый раз в 95% случаев остаются довольны сотрудничеством и продлевают договор | ||
66 | </li> | ||
67 | </ul> | ||
68 | </div> | ||
69 | <div> | ||
70 | <h3>Форма обратной связи</h3> | ||
71 | <p>Все поля обязательны для заполнения.</p> | ||
72 | <form class="callback main__cond-callback" method="POST" action="{{ route('form_feedback') }}"> | ||
73 | @csrf | ||
74 | <div class="callback__body"> | ||
75 | <input type="text" class="input" name="name" id="name" placeholder="Ваше имя" value="{{ old('name') ?? '' }}" required=""> | ||
76 | @error('name') | ||
77 | <span class="text-xs text-red-600"> | ||
78 | {{ $message }} | ||
79 | </span> | ||
80 | @enderror | ||
81 | <input type="text" class="input" name="name_company" id="name_company" value="{{ old('name_company') ?? '' }}" placeholder="Название судоходной компании" required=""> | ||
82 | @error('name_company') | ||
83 | <span class="text-xs text-red-600"> | ||
84 | {{ $message }} | ||
85 | </span> | ||
86 | @enderror | ||
87 | <input type="tel" class="input" name="telephone" id="telephone" value="{{ old('teelphone') ?? '' }}" placeholder="Телефон" required=""> | ||
88 | @error('telephone') | ||
89 | <span class="text-xs text-red-600"> | ||
90 | {{ $message }} | ||
91 | </span> | ||
92 | @enderror | ||
93 | <input type="email" class="input" name="email" id="email" value="{{ old('email') ?? '' }}" placeholder="Электронная почта" required=""> | ||
94 | @error('email') | ||
95 | <span class="text-xs text-red-600"> | ||
96 | {{ $message }} | ||
97 | </span> | ||
98 | @enderror | ||
99 | </div> | ||
100 | <textarea class="textarea callback__textarea" name="text" id="text" placeholder="Текст сообщения" required="">{{ old('text') ?? '' }}</textarea> | ||
101 | <div class="callback__bottom"> | ||
102 | <label class="checkbox"> | ||
103 | <input type="checkbox" name="politik" id="politik" class="checkbox__input" required=""> | ||
104 | <span class="checkbox__icon"> | ||
105 | <svg> | ||
106 | <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use> | ||
107 | </svg> | ||
108 | </span> | ||
109 | <span class="checkbox__text"> | ||
110 | <span> | ||
111 | Я согласен(на) с | ||
112 | <a href="{{ route('page', ['pages' => 'Politika-konfidencialnosti']) }}">Политикой конфиденциальности</a> | ||
113 | </span> | ||
114 | </span> | ||
115 | @error('politik') | ||
116 | <span class="text-xs text-red-600"> | ||
117 | {{ $message }} | ||
118 | </span> | ||
119 | @enderror | ||
120 | </label> | ||
121 | <button type="submit" class="button">Отправить</button> | ||
122 | </div> | ||
123 | </form> | ||
124 | </div> | ||
125 | </div> | ||
126 | </div> | ||
127 | </main> | ||
128 | @endif | ||
31 | </div> | 129 | </div> |
32 | @endsection | 130 | @endsection |
33 | 131 |
routes/web.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | use App\Http\Controllers\Ad_jobsController; | 3 | use App\Http\Controllers\Ad_jobsController; |
4 | use App\Http\Controllers\AdEmployerController; | 4 | use App\Http\Controllers\AdEmployerController; |
5 | use App\Http\Controllers\Admin\AdminController; | 5 | use App\Http\Controllers\Admin\AdminController; |
6 | use App\Http\Controllers\Admin\CategoryController; | 6 | use App\Http\Controllers\Admin\CategoryController; |
7 | use App\Http\Controllers\Admin\CategoryEmpController; | 7 | use App\Http\Controllers\Admin\CategoryEmpController; |
8 | use App\Http\Controllers\Admin\EducationController; | 8 | use App\Http\Controllers\Admin\EducationController; |
9 | use App\Http\Controllers\Admin\EmployersController; | 9 | use App\Http\Controllers\Admin\EmployersController; |
10 | use App\Http\Controllers\EmployerController as FrontEmployersController; | 10 | use App\Http\Controllers\EmployerController as FrontEmployersController; |
11 | use App\Http\Controllers\Admin\InfoBloksController; | 11 | use App\Http\Controllers\Admin\InfoBloksController; |
12 | use App\Http\Controllers\Admin\JobTitlesController; | 12 | use App\Http\Controllers\Admin\JobTitlesController; |
13 | use App\Http\Controllers\Admin\UsersController; | 13 | use App\Http\Controllers\Admin\UsersController; |
14 | use App\Http\Controllers\Admin\WorkersController; | 14 | use App\Http\Controllers\Admin\WorkersController; |
15 | use App\Http\Controllers\Auth\ForgotPasswordController; | 15 | use App\Http\Controllers\Auth\ForgotPasswordController; |
16 | use App\Http\Controllers\Auth\LoginController; | 16 | use App\Http\Controllers\Auth\LoginController; |
17 | use App\Http\Controllers\Auth\RegisterController; | 17 | use App\Http\Controllers\Auth\RegisterController; |
18 | use App\Http\Controllers\CKEditorController; | 18 | use App\Http\Controllers\CKEditorController; |
19 | use App\Http\Controllers\MediaController; | 19 | use App\Http\Controllers\MediaController; |
20 | use App\Http\Controllers\WorkerController; | 20 | use App\Http\Controllers\WorkerController; |
21 | use App\Models\Ad_jobs; | 21 | use App\Models\Ad_jobs; |
22 | use App\Models\User; | 22 | use App\Models\User; |
23 | use App\Http\Controllers\MainController; | 23 | use App\Http\Controllers\MainController; |
24 | use App\Http\Controllers\HomeController; | 24 | use App\Http\Controllers\HomeController; |
25 | use Illuminate\Support\Facades\Route; | 25 | use Illuminate\Support\Facades\Route; |
26 | use App\Http\Controllers\Admin\CompanyController; | 26 | use App\Http\Controllers\Admin\CompanyController; |
27 | use App\Http\Controllers\Admin\Ad_EmployersController; | 27 | use App\Http\Controllers\Admin\Ad_EmployersController; |
28 | use App\Http\Controllers\Admin\MsgAnswersController; | 28 | use App\Http\Controllers\Admin\MsgAnswersController; |
29 | use App\Http\Controllers\Admin\GroupsController; | 29 | use App\Http\Controllers\Admin\GroupsController; |
30 | use App\Http\Controllers\PagesController; | 30 | use App\Http\Controllers\PagesController; |
31 | use Illuminate\Support\Facades\Storage; | 31 | use Illuminate\Support\Facades\Storage; |
32 | use App\Http\Controllers\EmployerController; | 32 | use App\Http\Controllers\EmployerController; |
33 | use App\Http\Controllers\CompanyController as FrontCompanyController; | 33 | use App\Http\Controllers\CompanyController as FrontCompanyController; |
34 | 34 | ||
35 | 35 | ||
36 | /* | 36 | /* |
37 | |-------------------------------------------------------------------------- | 37 | |-------------------------------------------------------------------------- |
38 | | Web Routes | 38 | | Web Routes |
39 | |-------------------------------------------------------------------------- | 39 | |-------------------------------------------------------------------------- |
40 | | | 40 | | |
41 | | Here is where you can register web routes for your application. These | 41 | | Here is where you can register web routes for your application. These |
42 | | routes are loaded by the RouteServiceProvider within a group which | 42 | | routes are loaded by the RouteServiceProvider within a group which |
43 | | contains the "web" middleware group. Now create something great! | 43 | | contains the "web" middleware group. Now create something great! |
44 | | | 44 | | |
45 | */ | 45 | */ |
46 | /* | 46 | /* |
47 | Route::get('/', function () { | 47 | Route::get('/', function () { |
48 | return view('welcome'); | 48 | return view('welcome'); |
49 | })->name('index'); | 49 | })->name('index'); |
50 | */ | 50 | */ |
51 | 51 | ||
52 | Route::get('/', [MainController::class, 'index'])->name('index'); | 52 | Route::get('/', [MainController::class, 'index'])->name('index'); |
53 | 53 | ||
54 | //Роуты авторизации, регистрации, восстановления, аутентификации | 54 | //Роуты авторизации, регистрации, восстановления, аутентификации |
55 | Auth::routes(['verify' => true]); | 55 | Auth::routes(['verify' => true]); |
56 | 56 | ||
57 | // роуты регистрации, авторизации, восстановления пароля, верификации почты | 57 | // роуты регистрации, авторизации, восстановления пароля, верификации почты |
58 | /*Route::group([ | 58 | /*Route::group([ |
59 | 'as' => 'auth.', //имя маршрута, например auth.index | 59 | 'as' => 'auth.', //имя маршрута, например auth.index |
60 | 'prefix' => 'auth', // префикс маршрута, например, auth/index | 60 | 'prefix' => 'auth', // префикс маршрута, например, auth/index |
61 | ], function () { | 61 | ], function () { |
62 | //форма регистрации | 62 | //форма регистрации |
63 | Route::get('register', [RegisterController::class, 'register'])->name('register'); | 63 | Route::get('register', [RegisterController::class, 'register'])->name('register'); |
64 | 64 | ||
65 | //создание пользователя | 65 | //создание пользователя |
66 | Route::post('register', [RegisterController::class, 'create'])->name('create'); | 66 | Route::post('register', [RegisterController::class, 'create'])->name('create'); |
67 | 67 | ||
68 | //форма входа авторизации | 68 | //форма входа авторизации |
69 | Route::get('login', [LoginController::class, 'login'])->name('login'); | 69 | Route::get('login', [LoginController::class, 'login'])->name('login'); |
70 | 70 | ||
71 | //аутентификация | 71 | //аутентификация |
72 | Route::post('login', [LoginController::class, 'authenticate'])->name('auth'); | 72 | Route::post('login', [LoginController::class, 'authenticate'])->name('auth'); |
73 | 73 | ||
74 | //выход | 74 | //выход |
75 | Route::get('logout', [LoginController::class, 'logout'])->name('logout'); | 75 | Route::get('logout', [LoginController::class, 'logout'])->name('logout'); |
76 | 76 | ||
77 | //форма ввода адреса почты | 77 | //форма ввода адреса почты |
78 | Route::get('forgot-password', [ForgotPasswordController::class, 'form'])->name('forgot-form'); | 78 | Route::get('forgot-password', [ForgotPasswordController::class, 'form'])->name('forgot-form'); |
79 | 79 | ||
80 | //письмо на почту | 80 | //письмо на почту |
81 | Route::post('forgot-password', [ForgotPasswordController::class, 'mail'])->name('forgot-mail'); | 81 | Route::post('forgot-password', [ForgotPasswordController::class, 'mail'])->name('forgot-mail'); |
82 | 82 | ||
83 | //форма восстановления пароля | 83 | //форма восстановления пароля |
84 | Route::get('reset-password/token/{token}/email/{email}', | 84 | Route::get('reset-password/token/{token}/email/{email}', |
85 | [ResetPasswordController::class, 'form'] | 85 | [ResetPasswordController::class, 'form'] |
86 | )->name('reset-form'); | 86 | )->name('reset-form'); |
87 | 87 | ||
88 | //восстановление пароля | 88 | //восстановление пароля |
89 | Route::post('reset-password', | 89 | Route::post('reset-password', |
90 | [ResetPasswordController::class, 'reset'] | 90 | [ResetPasswordController::class, 'reset'] |
91 | )->name('reset-password'); | 91 | )->name('reset-password'); |
92 | 92 | ||
93 | //сообщение о необходимости проверки адреса почты | 93 | //сообщение о необходимости проверки адреса почты |
94 | Route::get('verify-message', [VerifyEmailController::class, 'message'])->name('verify-message'); | 94 | Route::get('verify-message', [VerifyEmailController::class, 'message'])->name('verify-message'); |
95 | 95 | ||
96 | //подтверждение адреса почты нового пользователя | 96 | //подтверждение адреса почты нового пользователя |
97 | Route::get('verify-email/token/{token}/id/{id}', [VerifyEmailController::class, 'verify']) | 97 | Route::get('verify-email/token/{token}/id/{id}', [VerifyEmailController::class, 'verify']) |
98 | ->where('token', '[a-f0-9]{32}') | 98 | ->where('token', '[a-f0-9]{32}') |
99 | ->where('id', '[0-9]+') | 99 | ->where('id', '[0-9]+') |
100 | ->name('verify-email'); | 100 | ->name('verify-email'); |
101 | });*/ | 101 | });*/ |
102 | 102 | ||
103 | //Личный кабинет пользователя | 103 | //Личный кабинет пользователя |
104 | Route::get('/home', [HomeController::class, 'index'])->name('home'); | 104 | Route::get('/home', [HomeController::class, 'index'])->name('home'); |
105 | 105 | ||
106 | /* | 106 | /* |
107 | Route::post('resend/verification-email', function (\Illuminate\Http\Request $request) { | 107 | Route::post('resend/verification-email', function (\Illuminate\Http\Request $request) { |
108 | $user = User::where('email',$request->input('email'))->first(); | 108 | $user = User::where('email',$request->input('email'))->first(); |
109 | 109 | ||
110 | $user->sendEmailVerificationNotification(); | 110 | $user->sendEmailVerificationNotification(); |
111 | 111 | ||
112 | return 'your response'; | 112 | return 'your response'; |
113 | })->middleware('throttle:6,1')->name('verification.resend'); | 113 | })->middleware('throttle:6,1')->name('verification.resend'); |
114 | */ | 114 | */ |
115 | 115 | ||
116 | // Авторизация, регистрация в админку | 116 | // Авторизация, регистрация в админку |
117 | Route::group([ | 117 | Route::group([ |
118 | 'as' => 'admin.', // имя маршрута, например auth.index | 118 | 'as' => 'admin.', // имя маршрута, например auth.index |
119 | 'prefix' => 'admin', // префикс маршрута, например auth/index | 119 | 'prefix' => 'admin', // префикс маршрута, например auth/index |
120 | 'middleware' => ['guest'], | 120 | 'middleware' => ['guest'], |
121 | ], function () { | 121 | ], function () { |
122 | // Форма регистрации | 122 | // Форма регистрации |
123 | Route::get('register', [AdminController::class, 'register'])->name('register'); | 123 | Route::get('register', [AdminController::class, 'register'])->name('register'); |
124 | // Создание пользователя | 124 | // Создание пользователя |
125 | Route::post('register', [AdminController::class, 'create'])->name('create'); | 125 | Route::post('register', [AdminController::class, 'create'])->name('create'); |
126 | 126 | ||
127 | //Форма входа | 127 | //Форма входа |
128 | Route::get('login', [AdminController::class, 'login'])->name('login'); | 128 | Route::get('login', [AdminController::class, 'login'])->name('login'); |
129 | 129 | ||
130 | // аутентификация | 130 | // аутентификация |
131 | Route::post('login', [AdminController::class, 'autenticate'])->name('auth'); | 131 | Route::post('login', [AdminController::class, 'autenticate'])->name('auth'); |
132 | 132 | ||
133 | }); | 133 | }); |
134 | 134 | ||
135 | // Личный кабинет админки | 135 | // Личный кабинет админки |
136 | Route::group([ | 136 | Route::group([ |
137 | 'as' => 'admin.', // имя маршрута, например auth.index | 137 | 'as' => 'admin.', // имя маршрута, например auth.index |
138 | 'prefix' => 'admin', // префикс маршрута, например auth/index | 138 | 'prefix' => 'admin', // префикс маршрута, например auth/index |
139 | 'middleware' => ['auth'], ['admin'], | 139 | 'middleware' => ['auth'], ['admin'], |
140 | ], function() { | 140 | ], function() { |
141 | 141 | ||
142 | // выход | 142 | // выход |
143 | Route::get('logout', [AdminController::class, 'logout'])->name('logout'); | 143 | Route::get('logout', [AdminController::class, 'logout'])->name('logout'); |
144 | 144 | ||
145 | // кабинет главная страница | 145 | // кабинет главная страница |
146 | Route::get('cabinet', [AdminController::class, 'index'])->name('index'); | 146 | Route::get('cabinet', [AdminController::class, 'index'])->name('index'); |
147 | 147 | ||
148 | // кабинет профиль админа - форма | 148 | // кабинет профиль админа - форма |
149 | Route::get('profile', [AdminController::class, 'profile'])->name('profile'); | 149 | Route::get('profile', [AdminController::class, 'profile'])->name('profile'); |
150 | // кабинет профиль админа - сохранение формы | 150 | // кабинет профиль админа - сохранение формы |
151 | Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile'); | 151 | Route::post('profile', [AdminController::class, 'store_profile'])->name('store_profile'); |
152 | 152 | ||
153 | //кабинет сообщения админа | 153 | //кабинет сообщения админа |
154 | //Route::get('messages', [AdminController::class, 'profile'])->name('profile'); | 154 | //Route::get('messages', [AdminController::class, 'profile'])->name('profile'); |
155 | 155 | ||
156 | 156 | ||
157 | // кабинет профиль - форма пароли | 157 | // кабинет профиль - форма пароли |
158 | Route::get('password', [AdminController::class, 'profile_password'])->name('password'); | 158 | Route::get('password', [AdminController::class, 'profile_password'])->name('password'); |
159 | // кабинет профиль - сохранение формы пароля | 159 | // кабинет профиль - сохранение формы пароля |
160 | Route::post('password', [AdminController::class, 'profile_password_new'])->name('password'); | 160 | Route::post('password', [AdminController::class, 'profile_password_new'])->name('password'); |
161 | 161 | ||
162 | 162 | ||
163 | // кабинет профиль пользователя - форма | 163 | // кабинет профиль пользователя - форма |
164 | Route::get('user-profile/{user}', [AdminController::class, 'profile_user'])->name('user-profile'); | 164 | Route::get('user-profile/{user}', [AdminController::class, 'profile_user'])->name('user-profile'); |
165 | // кабинет профиль пользователя - сохранение формы | 165 | // кабинет профиль пользователя - сохранение формы |
166 | Route::post('user-profile/{user}', [AdminController::class, 'store_profile_user'])->name('user-store_profile'); | 166 | Route::post('user-profile/{user}', [AdminController::class, 'store_profile_user'])->name('user-store_profile'); |
167 | 167 | ||
168 | // кабинет профиль работодатель - форма | 168 | // кабинет профиль работодатель - форма |
169 | Route::get('employer-profile/{employer}', [EmployersController::class, 'form_update_employer'])->name('employer-profile'); | 169 | Route::get('employer-profile/{employer}', [EmployersController::class, 'form_update_employer'])->name('employer-profile'); |
170 | // кабинет профиль работодатель - сохранение формы | 170 | // кабинет профиль работодатель - сохранение формы |
171 | Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile'); | 171 | Route::post('employer-profile/{employer}', [EmployersController::class, 'update_employer'])->name('update-employer-profile'); |
172 | // кабинет удаление профиль работодателя и юзера | 172 | // кабинет удаление профиль работодателя и юзера |
173 | Route::delete('employers/delete/{employer}/{user}', [EmployersController::class, 'delete_employer'])->name('delete-employer'); | 173 | Route::delete('employers/delete/{employer}/{user}', [EmployersController::class, 'delete_employer'])->name('delete-employer'); |
174 | 174 | ||
175 | // кабинет профиль работник - форма | 175 | // кабинет профиль работник - форма |
176 | Route::get('worker-profile/add/{user}', [WorkersController::class, 'form_add_worker'])->name('worker-profile-add'); | 176 | Route::get('worker-profile/add/{user}', [WorkersController::class, 'form_add_worker'])->name('worker-profile-add'); |
177 | Route::post('worker-profile/add/{user}', [WorkersController::class, 'form_store_worker'])->name('worker-profile-store'); | 177 | Route::post('worker-profile/add/{user}', [WorkersController::class, 'form_store_worker'])->name('worker-profile-store'); |
178 | Route::get('worker-profile/{worker}', [WorkersController::class, 'form_edit_worker'])->name('worker-profile-edit'); | 178 | Route::get('worker-profile/{worker}', [WorkersController::class, 'form_edit_worker'])->name('worker-profile-edit'); |
179 | // кабинет профиль работник - сохранение формы | 179 | // кабинет профиль работник - сохранение формы |
180 | Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile-update'); | 180 | Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile-update'); |
181 | 181 | ||
182 | // Медиа | 182 | // Медиа |
183 | Route::get('media', [MediaController::class, 'index'])->name('media'); | 183 | Route::get('media', [MediaController::class, 'index'])->name('media'); |
184 | Route::delete('media/{media}', [MediaController::class, 'delete'])->name('delete-media'); | 184 | Route::delete('media/{media}', [MediaController::class, 'delete'])->name('delete-media'); |
185 | 185 | ||
186 | // кабинет настройки сайта - форма | 186 | // кабинет настройки сайта - форма |
187 | Route::get('config', [AdminController::class, 'config_form'])->name('config'); | 187 | Route::get('config', [AdminController::class, 'config_form'])->name('config'); |
188 | // кабинет настройки сайта сохранение формы | 188 | // кабинет настройки сайта сохранение формы |
189 | Route::post('config', [AdminController::class, 'store_config'])->name('store_config'); | 189 | Route::post('config', [AdminController::class, 'store_config'])->name('store_config'); |
190 | 190 | ||
191 | // кабинет - новости | 191 | // кабинет - новости |
192 | Route::get('news-list', [AdminController::class, 'news_admin'])->name('news_admin'); | 192 | Route::get('news-list', [AdminController::class, 'news_admin'])->name('news_admin'); |
193 | Route::get('news/add', [AdminController::class, 'new_admin_add'])->name('new_admin_add'); | 193 | Route::get('news/add', [AdminController::class, 'new_admin_add'])->name('new_admin_add'); |
194 | Route::post('news/add', [AdminController::class, 'new_admin_add_save'])->name('new_admin_save_add'); | 194 | Route::post('news/add', [AdminController::class, 'new_admin_add_save'])->name('new_admin_save_add'); |
195 | Route::get('news/edit/{new}', [AdminController::class, 'new_admin_edit'])->name('new_admin_edit'); | 195 | Route::get('news/edit/{new}', [AdminController::class, 'new_admin_edit'])->name('new_admin_edit'); |
196 | Route::post('news/edit/{new}', [AdminController::class, 'new_admin_update_save'])->name('new_admin_update'); | 196 | Route::post('news/edit/{new}', [AdminController::class, 'new_admin_update_save'])->name('new_admin_update'); |
197 | Route::get('news/delete/{new}', [AdminController::class, 'new_admin_delete'])->name('new_admin_delete'); | 197 | Route::get('news/delete/{new}', [AdminController::class, 'new_admin_delete'])->name('new_admin_delete'); |
198 | 198 | ||
199 | // кабинет - пользователи | 199 | // кабинет - пользователи |
200 | Route::get('users', [UsersController::class, 'index'])->name('users'); | 200 | Route::get('users', [UsersController::class, 'index'])->name('users'); |
201 | 201 | ||
202 | // кабинет - пользователи | 202 | // кабинет - пользователи |
203 | Route::get('admin-users', [AdminController::class, 'index_admin'])->name('admin-users'); | 203 | Route::get('admin-users', [AdminController::class, 'index_admin'])->name('admin-users'); |
204 | 204 | ||
205 | // кабинет - работодатели | 205 | // кабинет - работодатели |
206 | Route::get('employers', [EmployersController::class, 'index'])->name('employers'); | 206 | Route::get('employers', [EmployersController::class, 'index'])->name('employers'); |
207 | 207 | ||
208 | Route::get('employers/comment/{employer}', [EmployersController::class, 'comment_read'])->name('comment-employer'); | 208 | Route::get('employers/comment/{employer}', [EmployersController::class, 'comment_read'])->name('comment-employer'); |
209 | 209 | ||
210 | Route::get('flot/add/{employer}', [EmployersController::class, 'add_flot'])->name('flot_add'); | 210 | Route::get('flot/add/{employer}', [EmployersController::class, 'add_flot'])->name('flot_add'); |
211 | Route::post('flot/add', [EmployersController::class, 'save_add_flot'])->name('flot_add_save'); | 211 | Route::post('flot/add', [EmployersController::class, 'save_add_flot'])->name('flot_add_save'); |
212 | Route::get('flot/{flot}/{employer}', [EmployersController::class, 'edit_flot'])->name('flot'); | 212 | Route::get('flot/{flot}/{employer}', [EmployersController::class, 'edit_flot'])->name('flot'); |
213 | Route::put('flot/{flot}', [EmployersController::class, 'edit_save_flot'])->name('flot_edit'); | 213 | Route::put('flot/{flot}', [EmployersController::class, 'edit_save_flot'])->name('flot_edit'); |
214 | Route::get('flot/{flot}/{employer_id}/delete', [EmployersController::class, 'delete_flot'])->name('flot_delete'); | 214 | Route::get('flot/{flot}/{employer_id}/delete', [EmployersController::class, 'delete_flot'])->name('flot_delete'); |
215 | 215 | ||
216 | // кабинет - соискатели | 216 | // кабинет - соискатели |
217 | Route::get('workers', [WorkersController::class, 'index'])->name('workers'); | 217 | Route::get('workers', [WorkersController::class, 'index'])->name('workers'); |
218 | 218 | ||
219 | // кабинет - база данных | 219 | // кабинет - база данных |
220 | Route::get('basedata', [UsersController::class, 'index_bd'])->name('basedata'); | 220 | Route::get('basedata', [UsersController::class, 'index_bd'])->name('basedata'); |
221 | Route::get('basedata/add', [UsersController::class, 'add_bd'])->name('add-basedata'); | 221 | Route::get('basedata/add', [UsersController::class, 'add_bd'])->name('add-basedata'); |
222 | Route::post('basedata/add', [UsersController::class, 'add_store_bd'])->name('add-store-basedata'); | 222 | Route::post('basedata/add', [UsersController::class, 'add_store_bd'])->name('add-store-basedata'); |
223 | Route::get('basedata/edit/{user}', [UsersController::class, 'edit_bd'])->name('edit-basedata'); | 223 | Route::get('basedata/edit/{user}', [UsersController::class, 'edit_bd'])->name('edit-basedata'); |
224 | Route::put('basedata/edit/{user}', [UsersController::class, 'update_bd'])->name('update-basedata'); | 224 | Route::put('basedata/edit/{user}', [UsersController::class, 'update_bd'])->name('update-basedata'); |
225 | Route::delete('basedata/delete/{user}', [UsersController::class, 'destroy_bd'])->name('delete-basedata'); | 225 | Route::delete('basedata/delete/{user}', [UsersController::class, 'destroy_bd'])->name('delete-basedata'); |
226 | Route::get('basedata/doc/{user}', [UsersController::class, 'doc_bd'])->name('doc-basedata'); | 226 | Route::get('basedata/doc/{user}', [UsersController::class, 'doc_bd'])->name('doc-basedata'); |
227 | 227 | ||
228 | // кабинет - вакансии | 228 | // кабинет - вакансии |
229 | Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers'); | 229 | Route::get('ad-employers', [Ad_EmployersController::class, 'index'])->name('ad-employers'); |
230 | Route::get('ad-employers/add', [Ad_EmployersController::class, 'create'])->name('add-ad-employers'); | 230 | Route::get('ad-employers/add', [Ad_EmployersController::class, 'create'])->name('add-ad-employers'); |
231 | Route::post('ad-employers/add', [Ad_EmployersController::class, 'store'])->name('store-ad-employers'); | 231 | Route::post('ad-employers/add', [Ad_EmployersController::class, 'store'])->name('store-ad-employers'); |
232 | Route::get('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'edit'])->name('edit-ad-employers'); | 232 | Route::get('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'edit'])->name('edit-ad-employers'); |
233 | Route::post('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'update'])->name('update-ad-employers'); | 233 | Route::post('ad-employers/edit/{ad_employer}', [Ad_EmployersController::class, 'update'])->name('update-ad-employers'); |
234 | Route::delete('ad-employers/delete/{ad_employer}', [Ad_EmployersController::class, 'destroy'])->name('delete-ad-employer'); | 234 | Route::delete('ad-employers/delete/{ad_employer}', [Ad_EmployersController::class, 'destroy'])->name('delete-ad-employer'); |
235 | 235 | ||
236 | // Редактирование должности в вакансии | 236 | // Редактирование должности в вакансии |
237 | Route::put('update-jobs/{ad_jobs}', [Ad_EmployersController::class, 'update_ad_jobs'])->name('update_jobs'); | 237 | Route::put('update-jobs/{ad_jobs}', [Ad_EmployersController::class, 'update_ad_jobs'])->name('update_jobs'); |
238 | Route::get('edit-jobs/{ad_jobs}', [Ad_EmployersController::class, 'edit_jobs'])->name('edit_jobs'); | 238 | Route::get('edit-jobs/{ad_jobs}', [Ad_EmployersController::class, 'edit_jobs'])->name('edit_jobs'); |
239 | 239 | ||
240 | 240 | ||
241 | // кабинет - категории | 241 | // кабинет - категории |
242 | //Route::get('categories', [AdminController::class, 'index'])->name('categories'); | 242 | //Route::get('categories', [AdminController::class, 'index'])->name('categories'); |
243 | 243 | ||
244 | // СRUD-операции над Справочником Категории | 244 | // СRUD-операции над Справочником Категории |
245 | 245 | ||
246 | Route::resource('categories', CategoryController::class, ['except' => ['show']]); | 246 | Route::resource('categories', CategoryController::class, ['except' => ['show']]); |
247 | 247 | ||
248 | // CRUD-операции над справочником Категории для работодателей | 248 | // CRUD-операции над справочником Категории для работодателей |
249 | Route::resource('category-emp', CategoryEmpController::class, ['except' => ['show']]); | 249 | Route::resource('category-emp', CategoryEmpController::class, ['except' => ['show']]); |
250 | 250 | ||
251 | // CRUD-операции над справочником Образование | 251 | // CRUD-операции над справочником Образование |
252 | Route::resource('education', EducationController::class, ['except' => ['show']]); | 252 | Route::resource('education', EducationController::class, ['except' => ['show']]); |
253 | 253 | ||
254 | Route::get('rename-program-education', [EducationController::class, 'rename_program'])->name('rename-program-education'); | 254 | Route::get('rename-program-education', [EducationController::class, 'rename_program'])->name('rename-program-education'); |
255 | Route::get('program-education', [EducationController::class, 'add_program'])->name('add-program-education'); | 255 | Route::get('program-education', [EducationController::class, 'add_program'])->name('add-program-education'); |
256 | Route::post('program-education', [EducationController::class, 'store_program'])->name('store-program-education'); | 256 | Route::post('program-education', [EducationController::class, 'store_program'])->name('store-program-education'); |
257 | 257 | ||
258 | Route::get('program-education/edit/{program}/{education}', [EducationController::class, 'edit_program'])->name('edit-program-education'); | 258 | Route::get('program-education/edit/{program}/{education}', [EducationController::class, 'edit_program'])->name('edit-program-education'); |
259 | Route::post('program-education/edit/{program}/{education}', [EducationController::class, 'update_program'])->name('update-program-education'); | 259 | Route::post('program-education/edit/{program}/{education}', [EducationController::class, 'update_program'])->name('update-program-education'); |
260 | 260 | ||
261 | Route::get('program-education/delete/{program}/{education}', [EducationController::class, 'delete_program'])->name('delete-program-education'); | 261 | Route::get('program-education/delete/{program}/{education}', [EducationController::class, 'delete_program'])->name('delete-program-education'); |
262 | 262 | ||
263 | //Route::get('job-titles', [AdminController::class, 'index'])->name('job-titles'); | 263 | //Route::get('job-titles', [AdminController::class, 'index'])->name('job-titles'); |
264 | /* | 264 | /* |
265 | * кабинет - CRUD-операции по справочнику должности | 265 | * кабинет - CRUD-операции по справочнику должности |
266 | * | 266 | * |
267 | */ | 267 | */ |
268 | Route::resource('job-titles', JobTitlesController::class, ['except' => ['show']]); | 268 | Route::resource('job-titles', JobTitlesController::class, ['except' => ['show']]); |
269 | 269 | ||
270 | // кабинет - сообщения (чтение чужих) | 270 | // кабинет - сообщения (чтение чужих) |
271 | Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages'); | 271 | Route::get('messages', [MsgAnswersController::class, 'messages'])->name('messages'); |
272 | // кабинет - просмотр сообщения чужого (чтение) | 272 | // кабинет - просмотр сообщения чужого (чтение) |
273 | Route::get('messages/{message}', [MsgAnswersController::class, 'read_message'])->name('read-message'); | 273 | Route::get('messages/{message}', [MsgAnswersController::class, 'read_message'])->name('read-message'); |
274 | 274 | ||
275 | // кабинет - сообщения (админские) | 275 | // кабинет - сообщения (админские) |
276 | Route::get('admin-messages', [MsgAnswersController::class, 'admin_messages'])->name('admin-messages'); | 276 | Route::get('admin-messages', [MsgAnswersController::class, 'admin_messages'])->name('admin-messages'); |
277 | // кабинет - сообщения (админские) | 277 | // кабинет - сообщения (админские) |
278 | Route::post('admin-messages', [MsgAnswersController::class, 'admin_messages_post'])->name('admin-messages-post'); | 278 | Route::post('admin-messages', [MsgAnswersController::class, 'admin_messages_post'])->name('admin-messages-post'); |
279 | // кабинет - sql - конструкция запросов | 279 | // кабинет - sql - конструкция запросов |
280 | Route::get('messages-sql', [MsgAnswersController::class, 'messages_sql'])->name('messages-sql'); | 280 | Route::get('messages-sql', [MsgAnswersController::class, 'messages_sql'])->name('messages-sql'); |
281 | 281 | ||
282 | /* | 282 | /* |
283 | * Расписанный подход в описании каждой директорий групп пользователей. | 283 | * Расписанный подход в описании каждой директорий групп пользователей. |
284 | */ | 284 | */ |
285 | // кабинет - группы пользователей | 285 | // кабинет - группы пользователей |
286 | Route::get('groups', [GroupsController::class, 'index'])->name('groups'); | 286 | Route::get('groups', [GroupsController::class, 'index'])->name('groups'); |
287 | // кабинет - добавление форма группы пользователей | 287 | // кабинет - добавление форма группы пользователей |
288 | Route::get('groups/add', [GroupsController::class, 'add'])->name('add-group'); | 288 | Route::get('groups/add', [GroupsController::class, 'add'])->name('add-group'); |
289 | // кабинет - сохранение формы группы пользователей | 289 | // кабинет - сохранение формы группы пользователей |
290 | Route::post('groups/add', [GroupsController::class, 'store'])->name('add-group-store'); | 290 | Route::post('groups/add', [GroupsController::class, 'store'])->name('add-group-store'); |
291 | // кабинет - редактирование форма группы пользователей | 291 | // кабинет - редактирование форма группы пользователей |
292 | Route::get('groups/edit/{group}', [GroupsController::class, 'edit'])->name('edit-group'); | 292 | Route::get('groups/edit/{group}', [GroupsController::class, 'edit'])->name('edit-group'); |
293 | // кабинет - сохранение редактированной формы группы пользователей | 293 | // кабинет - сохранение редактированной формы группы пользователей |
294 | Route::post('groups/edit/{group}', [GroupsController::class, 'update'])->name('update-group'); | 294 | Route::post('groups/edit/{group}', [GroupsController::class, 'update'])->name('update-group'); |
295 | // кабинет - удаление группы пользователей | 295 | // кабинет - удаление группы пользователей |
296 | Route::delete('groups/delete/{group}', [GroupsController::class, 'destroy'])->name('delete-group'); | 296 | Route::delete('groups/delete/{group}', [GroupsController::class, 'destroy'])->name('delete-group'); |
297 | 297 | ||
298 | 298 | ||
299 | // кабинет - список админов | 299 | // кабинет - список админов |
300 | Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin'); | 300 | Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin'); |
301 | 301 | ||
302 | // справочник Позиции | 302 | // справочник Позиции |
303 | Route::get('positions', [AdminController::class, 'position'])->name('position'); | 303 | Route::get('positions', [AdminController::class, 'position'])->name('position'); |
304 | Route::get('positions/add', [AdminController::class, 'position_add'])->name('add-position'); | 304 | Route::get('positions/add', [AdminController::class, 'position_add'])->name('add-position'); |
305 | Route::post('positions/add', [AdminController::class, 'position_add_save'])->name('add-save-position'); | 305 | Route::post('positions/add', [AdminController::class, 'position_add_save'])->name('add-save-position'); |
306 | Route::get('positions/edit/{position}', [AdminController::class, 'position_edit'])->name('edit-position'); | 306 | Route::get('positions/edit/{position}', [AdminController::class, 'position_edit'])->name('edit-position'); |
307 | Route::post('position/edit/{position}', [AdminController::class, 'position_update'])->name('update-position'); | 307 | Route::post('position/edit/{position}', [AdminController::class, 'position_update'])->name('update-position'); |
308 | Route::get('position/delete/{position}', [AdminController::class, 'position_delete'])->name('delete-position'); | 308 | Route::get('position/delete/{position}', [AdminController::class, 'position_delete'])->name('delete-position'); |
309 | 309 | ||
310 | /////редактор////// кабинет - редактор сайта//////////////////////// | 310 | /////редактор////// кабинет - редактор сайта//////////////////////// |
311 | Route::get('editor-site', function() { | 311 | Route::get('editor-site', function() { |
312 | return view('admin.editor.index'); | 312 | return view('admin.editor.index'); |
313 | })->name('editor-site'); | 313 | })->name('editor-site'); |
314 | 314 | ||
315 | 315 | ||
316 | // кабинет - редактор шапки-футера сайта | 316 | // кабинет - редактор шапки-футера сайта |
317 | Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks'); | 317 | Route::get('edit-blocks', [CompanyController::class, 'editblocks'])->name('edit-blocks'); |
318 | Route::get('edit-bloks/add', [CompanyController::class, 'editblock_add'])->name('add-block'); | 318 | Route::get('edit-bloks/add', [CompanyController::class, 'editblock_add'])->name('add-block'); |
319 | Route::post('edit-bloks/add', [CompanyController::class, 'editblock_store'])->name('add-block-store'); | 319 | Route::post('edit-bloks/add', [CompanyController::class, 'editblock_store'])->name('add-block-store'); |
320 | Route::get('edit-bloks/ajax', [CompanyController::class, 'editblock_ajax'])->name('ajax.block'); | 320 | Route::get('edit-bloks/ajax', [CompanyController::class, 'editblock_ajax'])->name('ajax.block'); |
321 | Route::get('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_edit'])->name('edit-block'); | 321 | Route::get('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_edit'])->name('edit-block'); |
322 | Route::put('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_update'])->name('update-block'); | 322 | Route::put('edit-bloks/edit/{block}', [CompanyController::class, 'editblock_update'])->name('update-block'); |
323 | Route::delete('edit-bloks/delete/{block}', [CompanyController::class, 'editblock_destroy'])->name('delete-block'); | 323 | Route::delete('edit-bloks/delete/{block}', [CompanyController::class, 'editblock_destroy'])->name('delete-block'); |
324 | 324 | ||
325 | 325 | ||
326 | // кабинет - редактор должности на главной | 326 | // кабинет - редактор должности на главной |
327 | Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main'); | 327 | Route::get('job-titles-main', [CompanyController::class, 'job_titles_main'])->name('job-titles-main'); |
328 | 328 | ||
329 | // кабинет - редактор работодатели на главной | 329 | // кабинет - редактор работодатели на главной |
330 | Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main'); | 330 | Route::get('employers-main', [CompanyController::class, 'employers_main'])->name('employers-main'); |
331 | 331 | ||
332 | 332 | ||
333 | // кабинет - редактор seo-сайта | 333 | // кабинет - редактор seo-сайта |
334 | Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo'); | 334 | Route::get('editor-seo', [CompanyController::class, 'editor_seo'])->name('editor-seo'); |
335 | Route::get('editor-seo/add', [CompanyController::class, 'editor_seo_add'])->name('add-seo'); | 335 | Route::get('editor-seo/add', [CompanyController::class, 'editor_seo_add'])->name('add-seo'); |
336 | Route::post('editor-seo/add', [CompanyController::class, 'editor_seo_store'])->name('add-seo-store'); | 336 | Route::post('editor-seo/add', [CompanyController::class, 'editor_seo_store'])->name('add-seo-store'); |
337 | Route::get('editor-seo/ajax', [CompanyController::class, 'editor_seo_ajax'])->name('ajax.seo'); | 337 | Route::get('editor-seo/ajax', [CompanyController::class, 'editor_seo_ajax'])->name('ajax.seo'); |
338 | Route::get('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_edit'])->name('edit-seo'); | 338 | Route::get('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_edit'])->name('edit-seo'); |
339 | Route::put('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_update'])->name('update-seo'); | 339 | Route::put('editor-seo/edit/{page}', [CompanyController::class, 'editor_seo_update'])->name('update-seo'); |
340 | Route::delete('editor-seo/delete/{page}', [CompanyController::class, 'editor_seo_destroy'])->name('delete-seo'); | 340 | Route::delete('editor-seo/delete/{page}', [CompanyController::class, 'editor_seo_destroy'])->name('delete-seo'); |
341 | 341 | ||
342 | 342 | ||
343 | // кабинет - редактор страниц | 343 | // кабинет - редактор страниц |
344 | Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages'); | 344 | Route::get('editor-pages', [CompanyController::class, 'editor_pages'])->name('editor-pages'); |
345 | // кабинет - добавление страницы | 345 | // кабинет - добавление страницы |
346 | Route::get('editor-pages/add', [CompanyController::class, 'editor_pages_add'])->name('add-page'); | 346 | Route::get('editor-pages/add', [CompanyController::class, 'editor_pages_add'])->name('add-page'); |
347 | // кабинет - сохранение формы страницы | 347 | // кабинет - сохранение формы страницы |
348 | Route::post('editor-page/add', [CompanyController::class, 'editor_pages_store'])->name('add-page-store'); | 348 | Route::post('editor-page/add', [CompanyController::class, 'editor_pages_store'])->name('add-page-store'); |
349 | // кабинет - редактирование форма страницы | 349 | // кабинет - редактирование форма страницы |
350 | Route::get('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_edit'])->name('edit-page'); | 350 | Route::get('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_edit'])->name('edit-page'); |
351 | // кабинет - сохранение редактированной формы страницы | 351 | // кабинет - сохранение редактированной формы страницы |
352 | Route::put('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_update'])->name('update-page'); | 352 | Route::put('editor-pages/edit/{page}', [CompanyController::class, 'editor_pages_update'])->name('update-page'); |
353 | // кабинет - удаление страницы | 353 | // кабинет - удаление страницы |
354 | Route::delete('editor-pages/delete/{page}', [CompanyController::class, 'editor_pages_destroy'])->name('delete-page'); | 354 | Route::delete('editor-pages/delete/{page}', [CompanyController::class, 'editor_pages_destroy'])->name('delete-page'); |
355 | 355 | ||
356 | 356 | ||
357 | // кабинет - реклама сайта | 357 | // кабинет - реклама сайта |
358 | Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames'); | 358 | Route::get('reclames', [CompanyController::class, 'reclames'])->name('reclames'); |
359 | Route::get('reclames/add', [CompanyController::class, 'reclames_add'])->name('add-reclames'); | 359 | Route::get('reclames/add', [CompanyController::class, 'reclames_add'])->name('add-reclames'); |
360 | Route::post('reclames/add', [CompanyController::class, 'reclames_store'])->name('add-reclames-store'); | 360 | Route::post('reclames/add', [CompanyController::class, 'reclames_store'])->name('add-reclames-store'); |
361 | Route::get('reclames/edit/{reclame}', [CompanyController::class, 'reclames_edit'])->name('edit-reclames'); | 361 | Route::get('reclames/edit/{reclame}', [CompanyController::class, 'reclames_edit'])->name('edit-reclames'); |
362 | Route::put('reclames/edit/{reclame}', [CompanyController::class, 'reclames_update'])->name('update-reclames'); | 362 | Route::put('reclames/edit/{reclame}', [CompanyController::class, 'reclames_update'])->name('update-reclames'); |
363 | Route::delete('reclames/delete/{reclame}', [CompanyController::class, 'reclames_destroy'])->name('delete-reclames'); | 363 | Route::delete('reclames/delete/{reclame}', [CompanyController::class, 'reclames_destroy'])->name('delete-reclames'); |
364 | //////////////////////////////////////////////////////////////////////// | 364 | //////////////////////////////////////////////////////////////////////// |
365 | 365 | ||
366 | 366 | ||
367 | // кабинет - отзывы о работодателе для модерации | 367 | // кабинет - отзывы о работодателе для модерации |
368 | Route::get('answers', [EmployersController::class, 'answers'])->name('answers'); | 368 | Route::get('answers', [EmployersController::class, 'answers'])->name('answers'); |
369 | 369 | ||
370 | // Общая страница статистики | 370 | // Общая страница статистики |
371 | Route::get('statics', function () { | 371 | Route::get('statics', function () { |
372 | return view('admin.static.index'); | 372 | return view('admin.static.index'); |
373 | })->name('statics'); | 373 | })->name('statics'); |
374 | 374 | ||
375 | // кабинет - статистика работников | 375 | // кабинет - статистика работников |
376 | Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers'); | 376 | Route::get('static-workers', [WorkersController::class, 'static_workers'])->name('static-workers'); |
377 | 377 | ||
378 | // кабинет - статистика вакансий работодателя | 378 | // кабинет - статистика вакансий работодателя |
379 | Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads'); | 379 | Route::get('static-ads', [EmployersController::class, 'static_ads'])->name('static-ads'); |
380 | 380 | ||
381 | // кабинет - справочник - блоки информации (дипломы и документы) для резюме работника | 381 | // кабинет - справочник - блоки информации (дипломы и документы) для резюме работника |
382 | /* | 382 | /* |
383 | * CRUD-операции над справочником дипломы и документы | 383 | * CRUD-операции над справочником дипломы и документы |
384 | */ | 384 | */ |
385 | //Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks'); | 385 | //Route::get('infobloks', [WorkersController::class, 'infobloks'])->name('infobloks'); |
386 | Route::resource('infobloks', InfoBloksController::class, ['except' => ['show']]); | 386 | Route::resource('infobloks', InfoBloksController::class, ['except' => ['show']]); |
387 | 387 | ||
388 | // кабинет - роли пользователя | 388 | // кабинет - роли пользователя |
389 | Route::get('roles', [UsersController::class, 'roles'])->name('roles'); | 389 | Route::get('roles', [UsersController::class, 'roles'])->name('roles'); |
390 | 390 | ||
391 | Route::get('admin_roles', [UsersController::class, 'admin_roles'])->name('admin_roles'); | 391 | Route::get('admin_roles', [UsersController::class, 'admin_roles'])->name('admin_roles'); |
392 | 392 | ||
393 | Route::get('logs', function() { | 393 | Route::get('logs', function() { |
394 | $files = Storage::files('logs/laravel.log'); | 394 | $files = Storage::files('logs/laravel.log'); |
395 | })->name('logs'); | 395 | })->name('logs'); |
396 | }); | 396 | }); |
397 | 397 | ||
398 | // Инструментальные страницы | 398 | // Инструментальные страницы |
399 | Route::post('ckeditor/upload', [CKEditorController::class, 'upload'])->name('ckeditor.image-upload'); | 399 | Route::post('ckeditor/upload', [CKEditorController::class, 'upload'])->name('ckeditor.image-upload'); |
400 | 400 | ||
401 | Route::get('redis/', [PagesController::class, 'redis'])->name('redis'); | 401 | Route::get('redis/', [PagesController::class, 'redis'])->name('redis'); |
402 | 402 | ||
403 | Route::get('excel/', [PagesController::class, 'excel'])->name('excel'); | 403 | Route::get('excel/', [PagesController::class, 'excel'])->name('excel'); |
404 | 404 | ||
405 | // Страницы с произвольным контентом | 405 | // Страницы с произвольным контентом |
406 | Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page'); | 406 | Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page'); |
407 | 407 | ||
408 | // Форма обратной связи | ||
409 | Route::post('form_feedback', [PagesController::class, 'form_feedback'])->name('form_feedback'); | ||
410 | |||
408 | // Публичные страницы соискателя | 411 | // Публичные страницы соискателя |
409 | Route::get('workers/profile/{worker}', [WorkerController::class, 'profile'])->name('worker_page'); | 412 | Route::get('workers/profile/{worker}', [WorkerController::class, 'profile'])->name('worker_page'); |
410 | 413 | ||
411 | //Страница вакансии | 414 | //Страница вакансии |
412 | Route::get('employer/ad/{ad_employer}', [AdEmployerController::class, 'ad_employer'])->name('ad-employer'); | 415 | Route::get('employer/ad/{ad_employer}', [AdEmployerController::class, 'ad_employer'])->name('ad-employer'); |
413 | 416 | ||
414 | //Вакансии | 417 | //Вакансии |
415 | Route::get('vacancies', [MainController::class, 'vacancies'])->name('vacancies'); | 418 | Route::get('vacancies', [MainController::class, 'vacancies'])->name('vacancies'); |
416 | 419 | ||
417 | //Вакансии поиск на главной | 420 | //Вакансии поиск на главной |
418 | Route::get('search-vacancies', [MainController::class, 'search_vacancies'])->name('search_vacancies'); | 421 | Route::get('search-vacancies', [MainController::class, 'search_vacancies'])->name('search_vacancies'); |
419 | 422 | ||
420 | //Вакансии категория детальная | 423 | //Вакансии категория детальная |
421 | Route::get('list-vacancies/{categories?}', [MainController::class, 'list_vacancies'])->name('list-vacancies'); | 424 | Route::get('list-vacancies/{categories?}', [MainController::class, 'list_vacancies'])->name('list-vacancies'); |
422 | 425 | ||
423 | // Лайк вакансии | 426 | // Лайк вакансии |
424 | Route::get('like-vacancy', [MainController::class, 'like_vacancy'])->name('like-vacancy'); | 427 | Route::get('like-vacancy', [MainController::class, 'like_vacancy'])->name('like-vacancy'); |
425 | 428 | ||
426 | //Детальная страница вакансии - работодателя | 429 | //Детальная страница вакансии - работодателя |
427 | Route::get('vacancie/{vacancy}', [FrontEmployersController::class, 'vacancie'])->name('vacancie'); | 430 | Route::get('vacancie/{vacancy}', [FrontEmployersController::class, 'vacancie'])->name('vacancie'); |
428 | 431 | ||
429 | //Судоходные компании | 432 | //Судоходные компании |
430 | Route::get('shipping-companies', [FrontCompanyController::class, 'shipping_companies'])->name('shipping_companies'); | 433 | Route::get('shipping-companies', [FrontCompanyController::class, 'shipping_companies'])->name('shipping_companies'); |
431 | 434 | ||
432 | //Детальная инфа о компании | 435 | //Детальная инфа о компании |
433 | Route::get('info-company/{company}', [FrontCompanyController::class, 'info_company'])->name('info_company'); | 436 | Route::get('info-company/{company}', [FrontCompanyController::class, 'info_company'])->name('info_company'); |
434 | 437 | ||
435 | //Образование | 438 | //Образование |
436 | Route::get('education', [MainController::class, 'education'])->name('education'); | 439 | Route::get('education', [MainController::class, 'education'])->name('education'); |
437 | 440 | ||
438 | //Новости | 441 | //Новости |
439 | Route::get('news', [MainController::class, 'news'])->name('news'); | 442 | Route::get('news', [MainController::class, 'news'])->name('news'); |
440 | Route::get('detail-new/{new}', [MainController::class, 'detail_new'])->name('detail_new'); | 443 | Route::get('detail-new/{new}', [MainController::class, 'detail_new'])->name('detail_new'); |
441 | 444 | ||
442 | //Контакты | 445 | //Контакты |
443 | Route::get('contacts', [MainController::class, 'contacts'])->name('contacts'); | 446 | Route::get('contacts', [MainController::class, 'contacts'])->name('contacts'); |
444 | 447 | ||
445 | //База резюме | 448 | //База резюме |
446 | Route::get('bd-resume', [WorkerController::class, 'bd_resume'])->name('bd_resume'); | 449 | Route::get('bd-resume', [WorkerController::class, 'bd_resume'])->name('bd_resume'); |
447 | Route::get('bd_resume_danger', function(){ | 450 | Route::get('bd_resume_danger', function(){ |
448 | return view('employers.bd_resume_danger'); | 451 | return view('employers.bd_resume_danger'); |
449 | })->name('bd_resume_danger'); | 452 | })->name('bd_resume_danger'); |
450 | 453 | ||
451 | Route::get('like-resume', [MainController::class, 'like_worker'])->name('like_resume'); | 454 | Route::get('like-resume', [MainController::class, 'like_worker'])->name('like_resume'); |
452 | 455 | ||
453 | //Анкета соискателя | 456 | //Анкета соискателя |
454 | Route::get('resume-profile/{worker}', [WorkerController::class, 'resume_profile'])->name('resume_profile'); | 457 | Route::get('resume-profile/{worker}', [WorkerController::class, 'resume_profile'])->name('resume_profile'); |
455 | 458 | ||
456 | //Скачать резюме | 459 | //Скачать резюме |
457 | Route::get('resume-download/{worker}', [WorkerController::class, 'resume_download'])->name('resume_download'); | 460 | Route::get('resume-download/{worker}', [WorkerController::class, 'resume_download'])->name('resume_download'); |
458 | Route::get('resume-download/all', [WorkerController::class, 'resume_download_all'])->name('resume_download_all2'); | 461 | Route::get('resume-download/all', [WorkerController::class, 'resume_download_all'])->name('resume_download_all2'); |
459 | Route::get('resume-download', [WorkerController::class, 'resume_download_all'])->name('resume_download_all'); | 462 | Route::get('resume-download', [WorkerController::class, 'resume_download_all'])->name('resume_download_all'); |
460 | 463 | ||
461 | 464 | ||
462 | //Вход в кабинет | 465 | //Вход в кабинет |
463 | Route::get('login', [MainController::class, 'input_login'])->name('login'); | 466 | Route::get('login', [MainController::class, 'input_login'])->name('login'); |
464 | 467 | ||
465 | // Выход из кабинета | 468 | // Выход из кабинета |
466 | Route::get('logout', [EmployerController::class, 'logout'])->name('logout'); | 469 | Route::get('logout', [EmployerController::class, 'logout'])->name('logout'); |
467 | 470 | ||
468 | Route::get( 'register_worker', [WorkerController::class, 'register_worker'])->name('register_worker'); | 471 | Route::get( 'register_worker', [WorkerController::class, 'register_worker'])->name('register_worker'); |
469 | Route::get('register_employer', [EmployerController::class, 'register_employer'])->name('register_employer'); | 472 | Route::get('register_employer', [EmployerController::class, 'register_employer'])->name('register_employer'); |
470 | 473 | ||
471 | //восстановление пароля | 474 | //восстановление пароля |
472 | Route::get('repair-password', [MainController::class, 'repair_password'])->name('repair_password'); | 475 | Route::get('repair-password', [MainController::class, 'repair_password'])->name('repair_password'); |
473 | // Звезда сообщения | 476 | // Звезда сообщения |
474 | Route::post('stars-answer', [WorkerController::class, 'stars_answer'])->name('stars_answer'); | 477 | Route::post('stars-answer', [WorkerController::class, 'stars_answer'])->name('stars_answer'); |
475 | 478 | ||
476 | // Борьба | 479 | // Борьба |
477 | Route::get('clear_cookie', function() { | 480 | Route::get('clear_cookie', function() { |
478 | \App\Classes\Cookies_vacancy::clear_vacancy(); | 481 | \App\Classes\Cookies_vacancy::clear_vacancy(); |
479 | return redirect()->route('index'); | 482 | return redirect()->route('index'); |
480 | })->name('clear_cookie'); | 483 | })->name('clear_cookie'); |
481 | 484 | ||
482 | Route::get('cookies', function() { | 485 | Route::get('cookies', function() { |
483 | return view('cookies'); | 486 | return view('cookies'); |
484 | })->name('cookies'); | 487 | })->name('cookies'); |
485 | 488 | ||
486 | // Личный кабинет работник | 489 | // Личный кабинет работник |
487 | Route::group([ | 490 | Route::group([ |
488 | 'as' => 'worker.', // имя маршрута, например auth.index | 491 | 'as' => 'worker.', // имя маршрута, например auth.index |
489 | 'prefix' => 'worker', // префикс маршрута, например auth/index | 492 | 'prefix' => 'worker', // префикс маршрута, например auth/index |
490 | 'middleware' => ['auth'], ['is_worker'], | 493 | 'middleware' => ['auth'], ['is_worker'], |
491 | ], function() { | 494 | ], function() { |
492 | // 1 страница - Моя анкета | 495 | // 1 страница - Моя анкета |
493 | Route::get('cabinet', [WorkerController::class, 'cabinet'])->name('cabinet'); | 496 | Route::get('cabinet', [WorkerController::class, 'cabinet'])->name('cabinet'); |
494 | Route::post('cabinet/{worker}', [WorkerController::class, 'cabinet_save'])->name('cabinet_save'); | 497 | Route::post('cabinet/{worker}', [WorkerController::class, 'cabinet_save'])->name('cabinet_save'); |
495 | 498 | ||
496 | // 2 страница - Сообщения | 499 | // 2 страница - Сообщения |
497 | Route::get('cabinet/messages/{type_message}', [WorkerController::class, 'messages'])->name('messages'); | 500 | Route::get('cabinet/messages/{type_message}', [WorkerController::class, 'messages'])->name('messages'); |
498 | Route::get('cabinet/dialog/{user1}/{user2}', [WorkerController::class, 'dialog'])->name('dialog'); | 501 | Route::get('cabinet/dialog/{user1}/{user2}', [WorkerController::class, 'dialog'])->name('dialog'); |
499 | // 3 страница - Избранные вакансии | 502 | // 3 страница - Избранные вакансии |
500 | Route::get('cabinet/favorite', [WorkerController::class, 'favorite'])->name('favorite'); | 503 | Route::get('cabinet/favorite', [WorkerController::class, 'favorite'])->name('favorite'); |
501 | // Продолжение борьбы против колорадов - избранные вакансии | 504 | // Продолжение борьбы против колорадов - избранные вакансии |
502 | Route::get('кабинет/favorite', [WorkerController::class, 'colorado'])->name('colorado'); | 505 | Route::get('кабинет/favorite', [WorkerController::class, 'colorado'])->name('colorado'); |
503 | 506 | ||
504 | // 4 страница - Сменить пароль | 507 | // 4 страница - Сменить пароль |
505 | Route::get('кабинет/new_password', [WorkerController::class, 'new_password'])->name('new_password'); | 508 | Route::get('кабинет/new_password', [WorkerController::class, 'new_password'])->name('new_password'); |
506 | Route::post('кабинет/new_password/save', [WorkerController::class, 'save_new_password'])->name('save_new_password'); | 509 | Route::post('кабинет/new_password/save', [WorkerController::class, 'save_new_password'])->name('save_new_password'); |
507 | 510 | ||
508 | // 5 страница - Удалить профиль | 511 | // 5 страница - Удалить профиль |
509 | Route::get('кабинет/delete_profile', [WorkerController::class, 'delete_profile'])->name('delete_profile'); | 512 | Route::get('кабинет/delete_profile', [WorkerController::class, 'delete_profile'])->name('delete_profile'); |
510 | Route::post('кабинет/delete_profile/delete', [WorkerController::class, 'delete_profile_result'])->name('deleteprofile_result'); | 513 | Route::post('кабинет/delete_profile/delete', [WorkerController::class, 'delete_profile_result'])->name('deleteprofile_result'); |
511 | 514 | ||
512 | // Резюме -pdf | 515 | // Резюме -pdf |
513 | Route::get('кабинет/download/{worker}', [WorkerController::class, 'download'])->name('download'); | 516 | Route::get('кабинет/download/{worker}', [WorkerController::class, 'download'])->name('download'); |
514 | 517 | ||
515 | // Поднятие анкеты | 518 | // Поднятие анкеты |
516 | Route::get('кабинет/up/{worker}', [WorkerController::class, 'up'])->name('up'); | 519 | Route::get('кабинет/up/{worker}', [WorkerController::class, 'up'])->name('up'); |
517 | 520 | ||
518 | // Добавление сертификата | 521 | // Добавление сертификата |
519 | Route::get('кабинет/new_sertificate/{worker}', [WorkerController::class, 'new_sertificate'])->name('new_sertificate'); | 522 | Route::get('кабинет/new_sertificate/{worker}', [WorkerController::class, 'new_sertificate'])->name('new_sertificate'); |
520 | Route::get('кабинет/add_sertificate', [WorkerController::class, 'add_serificate'])->name('add_serificate'); | 523 | Route::get('кабинет/add_sertificate', [WorkerController::class, 'add_serificate'])->name('add_serificate'); |
521 | Route::get('кабинет/edit_sertificate/{worker}/{doc}', [WorkerController::class, 'edit_sertificate'])->name('edit_sertificate'); | 524 | Route::get('кабинет/edit_sertificate/{worker}/{doc}', [WorkerController::class, 'edit_sertificate'])->name('edit_sertificate'); |
522 | Route::get('кабинет/edit_sertificate/{doc}', [WorkerController::class, 'update_serificate'])->name('update_serificate'); | 525 | Route::get('кабинет/edit_sertificate/{doc}', [WorkerController::class, 'update_serificate'])->name('update_serificate'); |
523 | Route::get('кабинет/delete_sertificate/{doc}', [WorkerController::class, 'delete_sertificate'])->name('delete_sertificate'); | 526 | Route::get('кабинет/delete_sertificate/{doc}', [WorkerController::class, 'delete_sertificate'])->name('delete_sertificate'); |
524 | 527 | ||
525 | // Добавление предыдущих контактов компании | 528 | // Добавление предыдущих контактов компании |
526 | Route::get('кабинет/prev_company/{worker}', [WorkerController::class, 'new_prev_company'])->name('new_prev_company'); | 529 | Route::get('кабинет/prev_company/{worker}', [WorkerController::class, 'new_prev_company'])->name('new_prev_company'); |
527 | Route::get('кабинет/add_prev_company', [WorkerController::class, 'add_prev_company'])->name('add_prev_company'); | 530 | Route::get('кабинет/add_prev_company', [WorkerController::class, 'add_prev_company'])->name('add_prev_company'); |
528 | Route::get('кабинет/edit_prev_company/{doc}/{worker}', [WorkerController::class, 'edit_prev_company'])->name('edit_prev_company'); | 531 | Route::get('кабинет/edit_prev_company/{doc}/{worker}', [WorkerController::class, 'edit_prev_company'])->name('edit_prev_company'); |
529 | Route::post('кабинет/update_prev_company/{doc}', [WorkerController::class, 'update_prev_company'])->name('update_prev_company'); | 532 | Route::post('кабинет/update_prev_company/{doc}', [WorkerController::class, 'update_prev_company'])->name('update_prev_company'); |
530 | Route::get('кабинет/delete_prev_company/{doc}', [WorkerController::class, 'delete_prev_company'])->name('delete_prev_company'); | 533 | Route::get('кабинет/delete_prev_company/{doc}', [WorkerController::class, 'delete_prev_company'])->name('delete_prev_company'); |
531 | 534 | ||
532 | // Добавление документа-диплома | 535 | // Добавление документа-диплома |
533 | Route::get('кабинет/add_diplom/{worker}', [WorkerController::class, 'add_diplom'])->name('add_diplom'); | 536 | Route::get('кабинет/add_diplom/{worker}', [WorkerController::class, 'add_diplom'])->name('add_diplom'); |
534 | Route::post('кабинет/add_diplom', [WorkerController::class, 'add_diplom_save'])->name('dop_info_save'); | 537 | Route::post('кабинет/add_diplom', [WorkerController::class, 'add_diplom_save'])->name('dop_info_save'); |
535 | Route::get('кабинет/delete_ad_diplom/{worker}', [WorkerController::class, 'delete_add_diplom'])->name('delete_add_diplom'); | 538 | Route::get('кабинет/delete_ad_diplom/{worker}', [WorkerController::class, 'delete_add_diplom'])->name('delete_add_diplom'); |
536 | 539 | ||
537 | // Добавление стандартного диплома | 540 | // Добавление стандартного диплома |
538 | Route::get('кабинет/add_document/{worker}', [WorkerController::class, 'add_document'])->name('add_document'); | 541 | Route::get('кабинет/add_document/{worker}', [WorkerController::class, 'add_document'])->name('add_document'); |
539 | Route::post('кабинет/add_document/', [WorkerController::class, 'add_document_save'])->name('add_document_save'); | 542 | Route::post('кабинет/add_document/', [WorkerController::class, 'add_document_save'])->name('add_document_save'); |
540 | Route::get('кабинет/edit_document/{doc}/{worker}', [WorkerController::class, 'edit_document'])->name('edit_document'); | 543 | Route::get('кабинет/edit_document/{doc}/{worker}', [WorkerController::class, 'edit_document'])->name('edit_document'); |
541 | Route::post('кабинет/edit_document/{doc}', [WorkerController::class, 'edit_document_save'])->name('edit_document_save'); | 544 | Route::post('кабинет/edit_document/{doc}', [WorkerController::class, 'edit_document_save'])->name('edit_document_save'); |
542 | Route::get('кабинет/delete_document/{doc}', [WorkerController::class, 'delete_document'])->name('delete_document'); | 545 | Route::get('кабинет/delete_document/{doc}', [WorkerController::class, 'delete_document'])->name('delete_document'); |
543 | 546 | ||
544 | // Отправка сообщения работодателю от соискателя | 547 | // Отправка сообщения работодателю от соискателя |
545 | Route::post('сообщение/', [WorkerController::class, 'new_message'])->name('new_message'); | 548 | Route::post('сообщение/', [WorkerController::class, 'new_message'])->name('new_message'); |
546 | }); | 549 | }); |
547 | 550 | ||
548 | // Личный кабинет работодателя | 551 | // Личный кабинет работодателя |
549 | Route::group([ | 552 | Route::group([ |
550 | 'as' => 'employer.', // имя маршрута, например auth.index | 553 | 'as' => 'employer.', // имя маршрута, например auth.index |
551 | 'prefix' => 'employer', // префикс маршрута, например auth/index | 554 | 'prefix' => 'employer', // префикс маршрута, например auth/index |
552 | 'middleware' => ['auth'], !['is_worker'], | 555 | 'middleware' => ['auth'], !['is_worker'], |
553 | ], function() { | 556 | ], function() { |
554 | // 0 страница - Личные данные работодателя | 557 | // 0 страница - Личные данные работодателя |
555 | Route::get('cabinet/employer_info', [EmployerController::class, 'employer_info'])->name('employer_info'); | 558 | Route::get('cabinet/employer_info', [EmployerController::class, 'employer_info'])->name('employer_info'); |
556 | Route::post('cabinet/employer_info/{user}', [EmployerController::class, 'employer_info_save'])->name('employer_info_save'); | 559 | Route::post('cabinet/employer_info/{user}', [EmployerController::class, 'employer_info_save'])->name('employer_info_save'); |
557 | 560 | ||
558 | // 1 страница - Профиль | 561 | // 1 страница - Профиль |
559 | Route::get('cabinet', [EmployerController::class, 'cabinet'])->name('cabinet'); | 562 | Route::get('cabinet', [EmployerController::class, 'cabinet'])->name('cabinet'); |
560 | Route::post('cabinet/{Employer}', [EmployerController::class, 'cabinet_save'])->name('cabinet_save'); | 563 | Route::post('cabinet/{Employer}', [EmployerController::class, 'cabinet_save'])->name('cabinet_save'); |
561 | Route::post('flot_add_ajax', [EmployerController::class, 'save_add_flot'])->name('save_add_flot'); | 564 | Route::post('flot_add_ajax', [EmployerController::class, 'save_add_flot'])->name('save_add_flot'); |
562 | Route::get('flot_delete_ajax/{Flot}', [EmployerController::class, 'delete_flot'])->name('delete_flot'); | 565 | Route::get('flot_delete_ajax/{Flot}', [EmployerController::class, 'delete_flot'])->name('delete_flot'); |
563 | Route::get('cabinet/flot_edit/{Flot}/{Employer}', [EmployerController::class, 'edit_flot'])->name('edit_flot'); | 566 | Route::get('cabinet/flot_edit/{Flot}/{Employer}', [EmployerController::class, 'edit_flot'])->name('edit_flot'); |
564 | Route::post('cabinet/flot_edit/{Flot}', [EmployerController::class, 'update_flot'])->name('update_flot_save'); | 567 | Route::post('cabinet/flot_edit/{Flot}', [EmployerController::class, 'update_flot'])->name('update_flot_save'); |
565 | Route::get('cabinet/flot', [EmployerController::class, 'slider_flot'])->name('slider_flot'); | 568 | Route::get('cabinet/flot', [EmployerController::class, 'slider_flot'])->name('slider_flot'); |
566 | 569 | ||
567 | // 2 страница - Добавление вакансий | 570 | // 2 страница - Добавление вакансий |
568 | Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie'); | 571 | Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie'); |
569 | Route::post('vacancie', [EmployerController::class, 'cabinet_vacancy_save1'])->name('vac_save'); | 572 | Route::post('vacancie', [EmployerController::class, 'cabinet_vacancy_save1'])->name('vac_save'); |
570 | Route::get('cabinet/vacancie_danger', [EmployerController::class, 'cabinet_vacancie_danger'])->name('cabinet_vacancie_danger'); | 573 | Route::get('cabinet/vacancie_danger', [EmployerController::class, 'cabinet_vacancie_danger'])->name('cabinet_vacancie_danger'); |
571 | 574 | ||
572 | 575 | ||
573 | Route::get('selected_people', [EmployerController::class, 'selected_people'])->name('selected_people'); | 576 | Route::get('selected_people', [EmployerController::class, 'selected_people'])->name('selected_people'); |
574 | 577 | ||
575 | // 3 страница - Мои вакансии | 578 | // 3 страница - Мои вакансии |
576 | Route::get('cabinet/vacancy_list', [EmployerController::class, 'vacancy_list'])->name('vacancy_list'); | 579 | Route::get('cabinet/vacancy_list', [EmployerController::class, 'vacancy_list'])->name('vacancy_list'); |
577 | Route::get('cabinet/vacancy/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); | 580 | Route::get('cabinet/vacancy/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); |
578 | Route::get('cabinet/vacancy-delete/{ad_employer}', [EmployerController::class, 'vacancy_delete'])->name('vacancy_delete'); | 581 | Route::get('cabinet/vacancy-delete/{ad_employer}', [EmployerController::class, 'vacancy_delete'])->name('vacancy_delete'); |
579 | Route::get('cabinet/vacancy-up/{ad_employer}', [EmployerController::class, 'vacancy_up'])->name('vacancy_up'); | 582 | Route::get('cabinet/vacancy-up/{ad_employer}', [EmployerController::class, 'vacancy_up'])->name('vacancy_up'); |
580 | Route::get('cabinet/vacancy-eye/{ad_employer}/{status}', [EmployerController::class, 'vacancy_eye'])->name('vacancy_eye'); | 583 | Route::get('cabinet/vacancy-eye/{ad_employer}/{status}', [EmployerController::class, 'vacancy_eye'])->name('vacancy_eye'); |
581 | Route::get('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); | 584 | Route::get('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); |
582 | Route::post('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_save_me'])->name('vacancy_save_me'); | 585 | Route::post('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_save_me'])->name('vacancy_save_me'); |
583 | 586 | ||
584 | // 4.1Ю. | 587 | // 4.1Ю. |
585 | Route::get('cabinet/ad_jobs/create/{ad_employer}', [Ad_jobsController::class, 'add_job_in_vac'])->name('add_job_in_vac'); | 588 | Route::get('cabinet/ad_jobs/create/{ad_employer}', [Ad_jobsController::class, 'add_job_in_vac'])->name('add_job_in_vac'); |
586 | Route::post('cabinet/ad_jobs/create', [Ad_jobsController::class, 'add_job_in_vac_save'])->name('add_job_in_vac_save'); | 589 | Route::post('cabinet/ad_jobs/create', [Ad_jobsController::class, 'add_job_in_vac_save'])->name('add_job_in_vac_save'); |
587 | Route::get('cabinet/ad_jobs/edit/{ad_job}/{ad_employer}', [Ad_jobsController::class, 'edit_job_in_vac'])->name('edit_job_in_vac'); | 590 | Route::get('cabinet/ad_jobs/edit/{ad_job}/{ad_employer}', [Ad_jobsController::class, 'edit_job_in_vac'])->name('edit_job_in_vac'); |
588 | Route::post('cabinet/ad_jobs/edit/{ad_job}', [Ad_jobsController::class, 'edit_job_in_vac_save'])->name('edit_job_in_vac_save'); | 591 | Route::post('cabinet/ad_jobs/edit/{ad_job}', [Ad_jobsController::class, 'edit_job_in_vac_save'])->name('edit_job_in_vac_save'); |
589 | Route::get('cabinet/ad_jobs/delete/{ad_job}', [Ad_jobsController::class, 'delete_job_in_vac'])->name('delete_job_in_vac'); | 592 | Route::get('cabinet/ad_jobs/delete/{ad_job}', [Ad_jobsController::class, 'delete_job_in_vac'])->name('delete_job_in_vac'); |
590 | 593 | ||
591 | // 4 страница - Отклики на вакансии | 594 | // 4 страница - Отклики на вакансии |
592 | Route::get('cabinet/answers/{employer}', [EmployerController::class, 'answers'])->name('answers'); | 595 | Route::get('cabinet/answers/{employer}', [EmployerController::class, 'answers'])->name('answers'); |
593 | Route::get('cabinet/status/{employer}', [EmployerController::class, 'supple_status2'])->name('supple'); | 596 | Route::get('cabinet/status/{employer}', [EmployerController::class, 'supple_status2'])->name('supple'); |
594 | Route::get('status/{employer}/{ad_response}/{flag}', [EmployerController::class, 'supple_status'])->name('status_msg'); | 597 | Route::get('status/{employer}/{ad_response}/{flag}', [EmployerController::class, 'supple_status'])->name('status_msg'); |
595 | 598 | ||
596 | // 5 страница - Сообщения | 599 | // 5 страница - Сообщения |
597 | Route::get('cabinet/messages/{type_message}', [EmployerController::class, 'messages'])->name('messages'); | 600 | Route::get('cabinet/messages/{type_message}', [EmployerController::class, 'messages'])->name('messages'); |
598 | Route::get('cabinet/dialog/{user1}/{user2}', [EmployerController::class, 'dialog'])->name('dialog'); | 601 | Route::get('cabinet/dialog/{user1}/{user2}', [EmployerController::class, 'dialog'])->name('dialog'); |
599 | Route::post('cabinet/send-message', [EmployerController::class, 'send_message'])->name('send_message'); | 602 | Route::post('cabinet/send-message', [EmployerController::class, 'send_message'])->name('send_message'); |
600 | Route::post('test123', [EmployerController::class, 'test123'])->name('test123'); | 603 | Route::post('test123', [EmployerController::class, 'test123'])->name('test123'); |
601 | 604 | ||
602 | // 6 страница - Избранный | 605 | // 6 страница - Избранный |
603 | Route::get('cabinet/favorites', [EmployerController::class, 'favorites'])->name('favorites'); | 606 | Route::get('cabinet/favorites', [EmployerController::class, 'favorites'])->name('favorites'); |
604 | 607 | ||
605 | //7 страница - База данных | 608 | //7 страница - База данных |
606 | Route::get('cabinet/bd', [EmployerController::class, 'bd'])->name('bd'); | 609 | Route::get('cabinet/bd', [EmployerController::class, 'bd'])->name('bd'); |
607 | 610 | ||
608 | //8 страница - База резюме | 611 | //8 страница - База резюме |
609 | Route::get('cabinet/bd-tupe', [EmployerController::class, 'bd_tupe'])->name('bd-tupe'); | 612 | Route::get('cabinet/bd-tupe', [EmployerController::class, 'bd_tupe'])->name('bd-tupe'); |
610 | 613 | ||
611 | // 9 рассылка сообщений | 614 | // 9 рассылка сообщений |
612 | Route::get('cabinet/send-all-messages', [EmployerController::class, 'send_all_messages'])->name('send_all_messages'); | 615 | Route::get('cabinet/send-all-messages', [EmployerController::class, 'send_all_messages'])->name('send_all_messages'); |
613 | Route::post('cabinet/send-all-messages/send', [EmployerController::class, 'send_all_post'])->name('send_all_post'); | 616 | Route::post('cabinet/send-all-messages/send', [EmployerController::class, 'send_all_post'])->name('send_all_post'); |
614 | 617 | ||
615 | // 10 страница FAQ вопросы | 618 | // 10 страница FAQ вопросы |
616 | Route::get('cabinet/faq', [EmployerController::class, 'faq'])->name('faq'); | 619 | Route::get('cabinet/faq', [EmployerController::class, 'faq'])->name('faq'); |
617 | 620 | ||
618 | // 11 страница - Настройка уведомлений | 621 | // 11 страница - Настройка уведомлений |
619 | Route::get('cabinet/subscribe', [EmployerController::class, 'subscribe'])->name('subscribe'); | 622 | Route::get('cabinet/subscribe', [EmployerController::class, 'subscribe'])->name('subscribe'); |
620 | Route::get('cabinet/subscribe/save', [EmployerController::class, 'save_subscribe'])->name('save_subscribe'); | 623 | Route::get('cabinet/subscribe/save', [EmployerController::class, 'save_subscribe'])->name('save_subscribe'); |
621 | 624 | ||
622 | // 12 страница - Сменить пароль | 625 | // 12 страница - Сменить пароль |
623 | Route::get('cabinet/password-reset', [EmployerController::class, 'password_reset'])->name('password_reset'); | 626 | Route::get('cabinet/password-reset', [EmployerController::class, 'password_reset'])->name('password_reset'); |
624 | Route::get('cabinet/password-reset/new', [EmployerController::class, 'new_password'])->name('new_password'); | 627 | Route::get('cabinet/password-reset/new', [EmployerController::class, 'new_password'])->name('new_password'); |
625 | 628 | ||
626 | // 13 страница - Удаление профиля | 629 | // 13 страница - Удаление профиля |
627 | Route::get('cabinet/delete-people', [EmployerController::class, 'delete_people'])->name('delete_people'); | 630 | Route::get('cabinet/delete-people', [EmployerController::class, 'delete_people'])->name('delete_people'); |
628 | Route::get('cabinet/action-delete-people', [EmployerController::class, 'action_delete_user'])->name('action_delete_user'); | 631 | Route::get('cabinet/action-delete-people', [EmployerController::class, 'action_delete_user'])->name('action_delete_user'); |
629 | Route::get('cabinet/action-ajax-delete-people', [EmployerController::class, 'ajax_delete_user'])->name('ajax_delete_user'); | 632 | Route::get('cabinet/action-ajax-delete-people', [EmployerController::class, 'ajax_delete_user'])->name('ajax_delete_user'); |
630 | 633 | ||
631 | // Отправил сообщение | 634 | // Отправил сообщение |
632 | Route::post('сообщение/', [EmployerController::class, 'new_message'])->name('new_message'); | 635 | Route::post('сообщение/', [EmployerController::class, 'new_message'])->name('new_message'); |
633 | }); | 636 | }); |
634 | 637 | ||
635 | Route::get('TestWorker', [WorkerController::class, 'TestWorker'])->name('TestWorker'); | 638 | Route::get('TestWorker', [WorkerController::class, 'TestWorker'])->name('TestWorker'); |
636 | 639 | ||
637 | 640 |