Commit 3dddd00f35cdf5590d358ad69cf5fa841394f1a8

Authored by Андрей Ларионов
Exists in master

Обновление по проекту пятница

Showing 20 changed files Inline Diff

app/Http/Controllers/CompanyController.php
1 <?php 1 <?php
2 2
3 namespace App\Http\Controllers; 3 namespace App\Http\Controllers;
4 4
5 use App\Models\Employer; 5 use App\Models\Employer;
6 use Illuminate\Http\Request; 6 use Illuminate\Http\Request;
7 7
8 class CompanyController extends Controller 8 class CompanyController extends Controller
9 { 9 {
10 public function shipping_companies(Request $request) { 10 public function shipping_companies(Request $request) {
11 $emps = Employer::query()->with('ads'); 11 $emps = Employer::query()->with('ads')->where('status_hidden', '=', '0');
12 if (($request->has('search')) && (!empty($request->get('search')))) { 12 if (($request->has('search')) && (!empty($request->get('search')))) {
13 $search = $request->get('search'); 13 $search = $request->get('search');
14 $emps = $emps->where('name_company', 'LIKE', "%$search%"); 14 $emps = $emps->where('name_company', 'LIKE', "%$search%");
15 } 15 }
16 16
17 $count_emps = $emps->count(); 17 $count_emps = $emps->count();
18 18
19 if ($request->get('sort')) { 19 if ($request->get('sort')) {
20 $sort = $request->get('sort'); 20 $sort = $request->get('sort');
21 switch ($sort) { 21 switch ($sort) {
22 case 'name_up': $emps = $emps->orderBy('name_company')->orderBy('id'); break; 22 case 'name_up': $emps = $emps->orderBy('name_company')->orderBy('id'); break;
23 case 'name_down': $emps = $emps->orderByDesc('name_company')->orderby('id'); break; 23 case 'name_down': $emps = $emps->orderByDesc('name_company')->orderby('id'); break;
24 case 'created_at_up': $emps = $emps->OrderBy('created_at')->orderBy('id'); break; 24 case 'created_at_up': $emps = $emps->OrderBy('created_at')->orderBy('id'); break;
25 case 'created_at_down': $emps = $emps->orderByDesc('created_at')->orderBy('id'); break; 25 case 'created_at_down': $emps = $emps->orderByDesc('created_at')->orderBy('id'); break;
26 case 'default': $emps = $emps->orderBy('id')->orderby('updated_at'); break; 26 case 'default': $emps = $emps->orderBy('id')->orderby('updated_at'); break;
27 default: $emps = $emps->orderBy('id')->orderby('updated_at'); break; 27 default: $emps = $emps->orderBy('id')->orderby('updated_at'); break;
28 } 28 }
29 } 29 }
30 30
31 $emps = $emps->paginate(4); 31 $emps = $emps->paginate(4);
32 32
33 33
34 if ($request->ajax()) { 34 if ($request->ajax()) {
35 if ($request->get('block') == '1') 35 if ($request->get('block') == '1')
36 return view('ajax.companies', compact('emps', 'count_emps')); 36 return view('ajax.companies', compact('emps', 'count_emps'));
37 else 37 else
38 return view('ajax.companies2', compact('emps', 'count_emps')); 38 return view('ajax.companies2', compact('emps', 'count_emps'));
39 } else { 39 } else {
40 return view('companies', compact('emps', 'count_emps')); 40 return view('companies', compact('emps', 'count_emps'));
41 } 41 }
42 } 42 }
43 43
44 public function info_company(Employer $company) { 44 public function info_company(Employer $company) {
45 if (isset(Auth()->user()->id)) { 45 if (isset(Auth()->user()->id)) {
46 $user_id = Auth()->user()->id; 46 $user_id = Auth()->user()->id;
47 } else { 47 } else {
48 $user_id = 0; 48 $user_id = 0;
49 } 49 }
50 $company = Employer::with('ads')->with('flots')->with('users') 50 $company = Employer::with('ads')->with('flots')->with('users')
51 ->where('id', '=', $company->id)->get(); 51 ->where('id', '=', $company->id)->get();
52 52
53 $title = $company[0]->name_company; 53 $title = $company[0]->name_company;
54 54
55 return view('info_company_new', compact('company', 'user_id', 'title')); 55 return view('info_company_new', compact('company', 'user_id', 'title'));
56 } 56 }
57 } 57 }
58 58
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 $categories = Category::query()->active()->get(); 165 if (Auth()->user()->is_public) {
166 //if ($categories->count()) { 166 $categories = Category::query()->active()->get();
167 // $jobs = Job_title::query()->OrderBy('name')->where('is_remove', '=', '0')->Notbdif()->where('position_id', $categories[0]->id)->get(); 167
168 //} else { 168 $jobs = Job_title::query()->OrderBy('name')->where('is_remove', '=', '0')->where('is_bd', '=', '0')->get();
169 // $jobs = Job_title::query()->OrderBy('name')->where('is_remove', '=', '0')->Notbdif()->where('position_id', 0)->get(); 169 $Employer = Employer::query()->with('users')->with('ads')->with('flots')->
170 //} 170
171 $jobs = Job_title::query()->OrderBy('name')->where('is_remove', '=', '0')->where('is_bd', '=' , '0')->get(); 171 WhereHas('users',
172 $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> 172 function (Builder $query) use ($id) {
173 WhereHas('users', 173 $query->Where('id', $id);
174 function (Builder $query) use ($id) {$query->Where('id', $id); 174 })->get();
175 })->get(); 175
176 return view('employers.add_vacancy', compact('Employer', 'jobs' , 'categories')); 176 return view('employers.add_vacancy', compact('Employer', 'jobs', 'categories'));
177 } else {
178 return redirect()->route('employer.cabinet_vacancie_danger');
179 }
180 }
181
182 // Форма предупреждения об оплате
183 public function cabinet_vacancie_danger() {
184 return view('employers.add_vacancy_danger');
177 } 185 }
178 186
179 // Сохранение вакансии 187 // Сохранение вакансии
180 public function cabinet_vacancy_save1(VacancyRequestEdit $request) { 188 public function cabinet_vacancy_save1(VacancyRequestEdit $request) {
181 $params_emp = $request->all(); 189 $params_emp = $request->all();
182 190
183 $params_job["job_title_id"] = $params_emp['job_title_id']; 191 $params_job["job_title_id"] = $params_emp['job_title_id'];
184 //$params_job["min_salary"] = $params_emp['min_salary']; 192 //$params_job["min_salary"] = $params_emp['min_salary'];
185 //$params_job["max_salary"] = $params_emp['max_salary']; 193 //$params_job["max_salary"] = $params_emp['max_salary'];
186 //$params_job["region"] = $params_emp['region']; 194 //$params_job["region"] = $params_emp['region'];
187 //$params_job["power"] = $params_emp['power']; 195 //$params_job["power"] = $params_emp['power'];
188 //$params_job["sytki"] = $params_emp['sytki']; 196 //$params_job["sytki"] = $params_emp['sytki'];
189 //$params_job["start"] = $params_emp['start']; 197 //$params_job["start"] = $params_emp['start'];
190 //$params_job["flot"] = $params_emp['flot']; 198 //$params_job["flot"] = $params_emp['flot'];
191 //$params_job["description"] = $params_emp['description']; 199 //$params_job["description"] = $params_emp['description'];
192 200
193 $ad_jobs = Ad_employer::create($params_emp); 201 $ad_jobs = Ad_employer::create($params_emp);
194 //$params_job['ad_employer_id'] = $ad_jobs->id; 202 //$params_job['ad_employer_id'] = $ad_jobs->id;
195 //Ad_jobs::create($params_job); 203 //Ad_jobs::create($params_job);
196 $ad_jobs->jobs()->sync($request->get('job_title_id')); 204 $ad_jobs->jobs()->sync($request->get('job_title_id'));
197 205
198 return redirect()->route('employer.vacancy_list'); 206 return redirect()->route('employer.vacancy_list');
199 } 207 }
200 208
201 // Список вакансий 209 // Список вакансий
202 public function vacancy_list(Request $request) { 210 public function vacancy_list(Request $request) {
203 $id = Auth()->user()->id; 211 $id = Auth()->user()->id;
204 $Employer = Employer::query()->where('user_id', $id)->first(); 212 $Employer = Employer::query()->where('user_id', $id)->first();
205 $vacancy_list = Ad_employer::query()->with('jobs')-> 213 $vacancy_list = Ad_employer::query()->with('jobs')->
206 with('jobs_code')-> 214 with('jobs_code')->
207 where('employer_id', $Employer->id); 215 where('employer_id', $Employer->id);
208 216
209 if ($request->get('sort')) { 217 if ($request->get('sort')) {
210 $sort = $request->get('sort'); 218 $sort = $request->get('sort');
211 switch ($sort) { 219 switch ($sort) {
212 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;
213 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;
214 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;
215 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;
216 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;
217 default: $vacancy_list = $vacancy_list->orderBy('id')->orderby('updated_at'); break; 225 default: $vacancy_list = $vacancy_list->orderBy('id')->orderby('updated_at'); break;
218 } 226 }
219 } 227 }
220 $vacancy_list = $vacancy_list->paginate(4); 228 $vacancy_list = $vacancy_list->paginate(4);
221 229
222 //ajax 230 //ajax
223 if ($request->ajax()) { 231 if ($request->ajax()) {
224 return view('employers.ajax.list_vacancy', compact('vacancy_list', 'Employer')); 232 return view('employers.ajax.list_vacancy', compact('vacancy_list', 'Employer'));
225 } else { 233 } else {
226 return view('employers.list_vacancy', compact('vacancy_list', 'Employer')); 234 return view('employers.list_vacancy', compact('vacancy_list', 'Employer'));
227 } 235 }
228 } 236 }
229 237
230 // Карточка вакансии 238 // Карточка вакансии
231 public function vacancy_edit(Ad_employer $ad_employer) { 239 public function vacancy_edit(Ad_employer $ad_employer) {
232 $id = Auth()->user()->id; 240 $id = Auth()->user()->id;
233 $Positions = Category::query()->where('is_remove', '=', '0')->get(); 241 $Positions = Category::query()->where('is_remove', '=', '0')->get();
234 242
235 $jobs = Job_title::query()->OrderBy('name')-> 243 $jobs = Job_title::query()->OrderBy('name')->
236 where('is_remove', 0)->where('is_bd', '=' , '0')->get(); 244 where('is_remove', 0)->where('is_bd', '=' , '0')->get();
237 245
238 246
239 $jobs = Job_title::query()->OrderBy('name')->where('is_remove', 0)->get(); 247 $jobs = Job_title::query()->OrderBy('name')->where('is_remove', 0)->get();
240 $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> 248 $Employer = Employer::query()->with('users')->with('ads')->with('flots')->
241 where('user_id', $id)->first(); 249 where('user_id', $id)->first();
242 return view('employers.edit_vacancy', compact('ad_employer', 'Positions','Employer', 'jobs')); 250 return view('employers.edit_vacancy', compact('ad_employer', 'Positions','Employer', 'jobs'));
243 } 251 }
244 252
245 // Сохранение-редактирование записи 253 // Сохранение-редактирование записи
246 public function vacancy_save_me(VacancyRequestEdit $request, Ad_employer $ad_employer) { 254 public function vacancy_save_me(VacancyRequestEdit $request, Ad_employer $ad_employer) {
247 $params = $request->all(); 255 $params = $request->all();
248 256
249 //$jobs['flot'] = $params['flot']; 257 //$jobs['flot'] = $params['flot'];
250 //$jobs['job_title_id'] = $params['job_title_id']; 258 //$jobs['job_title_id'] = $params['job_title_id'];
251 //$titles['position_id'] = $params['position_id']; 259 //$titles['position_id'] = $params['position_id'];
252 //unset($params['job_title_id']); 260 //unset($params['job_title_id']);
253 261
254 $ad_employer->update($params); 262 $ad_employer->update($params);
255 263
256 //$job_ = Ad_jobs::query()->where('job_title_id', $jobs['job_title_id'])-> 264 //$job_ = Ad_jobs::query()->where('job_title_id', $jobs['job_title_id'])->
257 // where('ad_employer_id', $ad_employer->id)->first(); 265 // where('ad_employer_id', $ad_employer->id)->first();
258 //$data = Ad_jobs::find($job_->id); 266 //$data = Ad_jobs::find($job_->id);
259 //$ad_jobs = $data->update($jobs); 267 //$ad_jobs = $data->update($jobs);
260 return redirect()->route('employer.vacancy_list'); 268 return redirect()->route('employer.vacancy_list');
261 } 269 }
262 270
263 // Сохранение карточки вакансии 271 // Сохранение карточки вакансии
264 public function vacancy_save(Request $request, Ad_employer $ad_employer) { 272 public function vacancy_save(Request $request, Ad_employer $ad_employer) {
265 $all = $request->all(); 273 $all = $request->all();
266 $ad_employer->update($all); 274 $ad_employer->update($all);
267 return redirect()->route('employer.cabinet_vacancie'); 275 return redirect()->route('employer.cabinet_vacancie');
268 } 276 }
269 277
270 // Удаление карточки вакансии 278 // Удаление карточки вакансии
271 public function vacancy_delete(Ad_employer $ad_employer) { 279 public function vacancy_delete(Ad_employer $ad_employer) {
272 $ad_employer->delete(); 280 $ad_employer->delete();
273 281
274 return redirect()->route('employer.vacancy_list') 282 return redirect()->route('employer.vacancy_list')
275 ->with('success', 'Данные были успешно сохранены'); 283 ->with('success', 'Данные были успешно сохранены');
276 } 284 }
277 285
278 // Обновление даты 286 // Обновление даты
279 public function vacancy_up(Ad_employer $ad_employer) { 287 public function vacancy_up(Ad_employer $ad_employer) {
280 $up = date('m/d/Y h:i:s', time());; 288 $up = date('m/d/Y h:i:s', time());;
281 $vac_emp = Ad_employer::findOrFail($ad_employer->id); 289 $vac_emp = Ad_employer::findOrFail($ad_employer->id);
282 $vac_emp->updated_at = $up; 290 $vac_emp->updated_at = $up;
283 $vac_emp->save(); 291 $vac_emp->save();
284 292
285 return redirect()->route('employer.vacancy_list'); 293 return redirect()->route('employer.vacancy_list');
286 // начало конца 294 // начало конца
287 } 295 }
288 296
289 //Видимость вакансии 297 //Видимость вакансии
290 public function vacancy_eye(Ad_employer $ad_employer, $status) { 298 public function vacancy_eye(Ad_employer $ad_employer, $status) {
291 $vac_emp = Ad_employer::findOrFail($ad_employer->id); 299 $vac_emp = Ad_employer::findOrFail($ad_employer->id);
292 $vac_emp->active_is = $status; 300 $vac_emp->active_is = $status;
293 $vac_emp->save(); 301 $vac_emp->save();
294 302
295 return redirect()->route('employer.vacancy_list'); 303 return redirect()->route('employer.vacancy_list');
296 } 304 }
297 305
298 //Вакансия редактирования (шаблон) 306 //Вакансия редактирования (шаблон)
299 public function vacancy_update(Ad_employer $id) { 307 public function vacancy_update(Ad_employer $id) {
300 308
301 } 309 }
302 310
303 //Отклики на вакансию - лист 311 //Отклики на вакансию - лист
304 public function answers(Employer $employer, Request $request) { 312 public function answers(Employer $employer, Request $request) {
305 $user_id = Auth()->user()->id; 313 $user_id = Auth()->user()->id;
306 $answer = Ad_employer::query()->where('employer_id', $employer->id); 314 $answer = Ad_employer::query()->where('employer_id', $employer->id);
307 if ($request->has('search')) { 315 if ($request->has('search')) {
308 $search = trim($request->get('search')); 316 $search = trim($request->get('search'));
309 if (!empty($search)) $answer = $answer->where('name', 'LIKE', "%$search%"); 317 if (!empty($search)) $answer = $answer->where('name', 'LIKE', "%$search%");
310 } 318 }
311 319
312 $answer = $answer->with('response')->get(); 320 $answer = $answer->with('response')->get();
313 321
314 return view('employers.list_answer', compact('answer', 'user_id', 'employer')); 322 return view('employers.list_answer', compact('answer', 'user_id', 'employer'));
315 } 323 }
316 324
317 //Обновление статуса 325 //Обновление статуса
318 public function supple_status(employer $employer, ad_response $ad_response, $flag) { 326 public function supple_status(employer $employer, ad_response $ad_response, $flag) {
319 $ad_response->update(Array('flag' => $flag)); 327 $ad_response->update(Array('flag' => $flag));
320 return redirect()->route('employer.answers', ['employer' => $employer->id]); 328 return redirect()->route('employer.answers', ['employer' => $employer->id]);
321 } 329 }
322 330
323 //Страницы сообщений список 331 //Страницы сообщений список
324 public function messages($type_message) { 332 public function messages($type_message) {
325 $user_id = Auth()->user()->id; 333 $user_id = Auth()->user()->id;
326 334
327 $messages_input = Message::query()->with('vacancies')->with('user_from')-> 335 $messages_input = Message::query()->with('vacancies')->with('user_from')->
328 Where('to_user_id', $user_id)->OrderByDesc('created_at'); 336 Where('to_user_id', $user_id)->OrderByDesc('created_at');
329 337
330 $messages_output = Message::query()->with('vacancies')-> 338 $messages_output = Message::query()->with('vacancies')->
331 with('user_to')->where('user_id', $user_id)-> 339 with('user_to')->where('user_id', $user_id)->
332 OrderByDesc('created_at'); 340 OrderByDesc('created_at');
333 341
334 342
335 $count_input = $messages_input->count(); 343 $count_input = $messages_input->count();
336 $count_output = $messages_output->count(); 344 $count_output = $messages_output->count();
337 345
338 if ($type_message == 'input') { 346 if ($type_message == 'input') {
339 $messages = $messages_input->paginate(5); 347 $messages = $messages_input->paginate(5);
340 } 348 }
341 349
342 if ($type_message == 'output') { 350 if ($type_message == 'output') {
343 $messages = $messages_output->paginate(5); 351 $messages = $messages_output->paginate(5);
344 } 352 }
345 353
346 //dd($user_id, $messages[2]->vacancies); 354 //dd($user_id, $messages[2]->vacancies);
347 //jobs); 355 //jobs);
348 356
349 return view('employers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id')); 357 return view('employers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id'));
350 } 358 }
351 359
352 // Диалог между пользователями 360 // Диалог между пользователями
353 public function dialog(Request $request, User_Model $user1, User_Model $user2) { 361 public function dialog(Request $request, User_Model $user1, User_Model $user2) {
354 // Получение параметров. 362 // Получение параметров.
355 if ($request->has('ad_employer')){ 363 if ($request->has('ad_employer')){
356 $ad_employer = $request->get('ad_employer'); 364 $ad_employer = $request->get('ad_employer');
357 } else { 365 } else {
358 $ad_employer = 0; 366 $ad_employer = 0;
359 } 367 }
360 368
361 if (isset($user2->id)) { 369 if (isset($user2->id)) {
362 $companion = User_Model::query()->with('workers')-> 370 $companion = User_Model::query()->with('workers')->
363 with('employers')-> 371 with('employers')->
364 where('id', $user2->id)->first(); 372 where('id', $user2->id)->first();
365 } 373 }
366 374
367 $Messages = Message::query()-> 375 $Messages = Message::query()->
368 where('ad_employer_id', '=', $ad_employer)-> 376 where('ad_employer_id', '=', $ad_employer)->
369 where(function($query) use ($user1, $user2) { 377 where(function($query) use ($user1, $user2) {
370 $query->where('user_id', $user1->id)->where('to_user_id', $user2->id); 378 $query->where('user_id', $user1->id)->where('to_user_id', $user2->id);
371 })->orWhere(function($query) use ($user1, $user2) { 379 })->orWhere(function($query) use ($user1, $user2) {
372 $query->where('user_id', $user2->id)->where('to_user_id', $user1->id); 380 $query->where('user_id', $user2->id)->where('to_user_id', $user1->id);
373 })->where('ad_employer_id', '=', $ad_employer)->OrderBy('created_at')->get(); 381 })->where('ad_employer_id', '=', $ad_employer)->OrderBy('created_at')->get();
374 382
375 $id_vac = $Messages[$Messages->count() - 1]->ad_employer_id; 383 $id_vac = $Messages[$Messages->count() - 1]->ad_employer_id;
376 384
377 //$ad_employer = null; 385 //$ad_employer = null;
378 //if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first(); 386 //if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first();
379 $sender = $user1; 387 $sender = $user1;
380 388
381 return view('employers.dialog', compact('companion', 'sender', 'ad_employer', 'Messages')); 389 return view('employers.dialog', compact('companion', 'sender', 'ad_employer', 'Messages'));
382 } 390 }
383 391
384 // Регистрация работодателя 392 // Регистрация работодателя
385 public function register_employer(Request $request) { 393 public function register_employer(Request $request) {
386 $params = $request->all(); 394 $params = $request->all();
387 395
388 $rules = [ 396 $rules = [
389 //'surname' => ['required', 'string', 'max:255'], 397 //'surname' => ['required', 'string', 'max:255'],
390 //'name_man' => ['required', 'string', 'max:255'], 398 //'name_man' => ['required', 'string', 'max:255'],
391 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 399 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
392 'name_company' => ['required', 'string', 'max:255'], 400 'name_company' => ['required', 'string', 'max:255'],
393 'password' => ['required', 'string', 'min:6'], 401 'password' => ['required', 'string', 'min:6'],
394 ]; 402 ];
395 403
396 404
397 $messages = [ 405 $messages = [
398 'required' => 'Укажите обязательное поле', 406 'required' => 'Укажите обязательное поле',
399 'min' => [ 407 'min' => [
400 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 408 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
401 'integer' => 'Поле «:attribute» должно быть :min или больше', 409 'integer' => 'Поле «:attribute» должно быть :min или больше',
402 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 410 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
403 ], 411 ],
404 'max' => [ 412 'max' => [
405 'string' => 'Поле «:attribute» должно быть не больше :max символов', 413 'string' => 'Поле «:attribute» должно быть не больше :max символов',
406 'integer' => 'Поле «:attribute» должно быть :max или меньше', 414 'integer' => 'Поле «:attribute» должно быть :max или меньше',
407 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 415 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
408 ] 416 ]
409 ]; 417 ];
410 418
411 $email = $request->get('email'); 419 $email = $request->get('email');
412 if (!preg_match("/^[a-zA-Z0-9_\-.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-.]+$/", $email)) { 420 if (!preg_match("/^[a-zA-Z0-9_\-.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-.]+$/", $email)) {
413 return json_encode(Array("ERROR" => "Error: Отсутствует емайл или некорректный емайл")); 421 return json_encode(Array("ERROR" => "Error: Отсутствует емайл или некорректный емайл"));
414 } 422 }
415 423
416 if ($request->get('password') !== $request->get('confirmed')){ 424 if ($request->get('password') !== $request->get('confirmed')){
417 return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); 425 return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля"));
418 } 426 }
419 427
420 if (strlen($request->get('password')) < 6) { 428 if (strlen($request->get('password')) < 6) {
421 return json_encode(Array("ERROR" => "Error: Недостаточная длина пароля! Увеличьте себе длину пароля!")); 429 return json_encode(Array("ERROR" => "Error: Недостаточная длина пароля! Увеличьте себе длину пароля!"));
422 } 430 }
423 /* 431 /*
424 $specsumbol = Array('!','~', '#', '$', '%', '^', '&', '*', '(', ')', '-', '=', ';', ':', '<', '>', '?'); 432 $specsumbol = Array('!','~', '#', '$', '%', '^', '&', '*', '(', ')', '-', '=', ';', ':', '<', '>', '?');
425 $alpha = Array('Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'Z', 433 $alpha = Array('Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'Z',
426 'X', 'C', 'V', 'B', 'N', 'M'); 434 'X', 'C', 'V', 'B', 'N', 'M');
427 $spec_bool = false; 435 $spec_bool = false;
428 $alpha_bool = false; 436 $alpha_bool = false;
429 437
430 $haystack = $request->get('password'); 438 $haystack = $request->get('password');
431 439
432 foreach ($specsumbol as $it) { 440 foreach ($specsumbol as $it) {
433 if (strpos($haystack, $it) !== false) { 441 if (strpos($haystack, $it) !== false) {
434 $spec_bool = true; 442 $spec_bool = true;
435 } 443 }
436 } 444 }
437 445
438 foreach ($alpha as $it) { 446 foreach ($alpha as $it) {
439 if (strpos($haystack, $it) !== false) { 447 if (strpos($haystack, $it) !== false) {
440 $alpha_bool = true; 448 $alpha_bool = true;
441 } 449 }
442 } 450 }
443 451
444 if ((!$spec_bool) || (!$alpha_bool)) { 452 if ((!$spec_bool) || (!$alpha_bool)) {
445 return json_encode(Array("ERROR" => "Error: Нет спецсимволов в пароле, латинские буквы заглавные, а также один из символов: !~#$%^&*()-=;,:<>?")); 453 return json_encode(Array("ERROR" => "Error: Нет спецсимволов в пароле, латинские буквы заглавные, а также один из символов: !~#$%^&*()-=;,:<>?"));
446 }*/ 454 }*/
447 455
448 if (empty($request->get('surname'))) { 456 if (empty($request->get('surname'))) {
449 $params['surname'] = 'Неизвестно'; 457 $params['surname'] = 'Неизвестно';
450 } 458 }
451 if (empty($request->get('name_man'))) { 459 if (empty($request->get('name_man'))) {
452 $params['name_man'] = 'Неизвестно'; 460 $params['name_man'] = 'Неизвестно';
453 } 461 }
454 $validator = Validator::make($params, $rules, $messages); 462 $validator = Validator::make($params, $rules, $messages);
455 463
456 if ($validator->fails()) { 464 if ($validator->fails()) {
457 return json_encode(Array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); 465 return json_encode(Array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе."));
458 } else { 466 } else {
459 $user = $this->create($params); 467 $user = $this->create($params);
460 event(new Registered($user)); 468 event(new Registered($user));
461 Auth::guard()->login($user); 469 Auth::guard()->login($user);
462 } 470 }
463 471
464 if ($user) { 472 if ($user) {
465 return json_encode(Array("REDIRECT" => redirect()->route('employer.cabinet')->getTargetUrl()));; 473 return json_encode(Array("REDIRECT" => redirect()->route('employer.cabinet')->getTargetUrl()));;
466 } else { 474 } else {
467 return json_encode(Array("ERROR" => "Error2: Данные были утеряны!")); 475 return json_encode(Array("ERROR" => "Error2: Данные были утеряны!"));
468 } 476 }
469 } 477 }
470 478
471 // Создание пользователя 479 // Создание пользователя
472 protected function create(array $data) 480 protected function create(array $data)
473 { 481 {
474 $Use = new User_Model(); 482 $Use = new User_Model();
475 $Code_user = $Use->create([ 483 $Code_user = $Use->create([
476 'name' => $data['surname']." ".$data['name_man'], 484 'name' => $data['surname']." ".$data['name_man'],
477 'name_man' => $data['name_man'], 485 'name_man' => $data['name_man'],
478 'surname' => $data['surname'], 486 'surname' => $data['surname'],
479 'surname2' => $data['surname2'], 487 'surname2' => $data['surname2'],
480 'subscribe_email' => $data['email'], 488 'subscribe_email' => $data['email'],
481 'email' => $data['email'], 489 'email' => $data['email'],
482 'telephone' => $data['telephone'], 490 'telephone' => $data['telephone'],
483 'is_worker' => 0, 491 'is_worker' => 0,
484 'password' => Hash::make($data['password']), 492 'password' => Hash::make($data['password']),
485 'pubpassword' => base64_encode($data['password']), 493 'pubpassword' => base64_encode($data['password']),
486 'email_verified_at' => Carbon::now() 494 'email_verified_at' => Carbon::now()
487 ]); 495 ]);
488 496
489 if ($Code_user->id > 0) { 497 if ($Code_user->id > 0) {
490 $Employer = new Employer(); 498 $Employer = new Employer();
491 $Employer->user_id = $Code_user->id; 499 $Employer->user_id = $Code_user->id;
492 $Employer->name_company = $data['name_company']; 500 $Employer->name_company = $data['name_company'];
493 $Employer->email = $data['email']; 501 $Employer->email = $data['email'];
494 $Employer->telephone = $data['telephone']; 502 $Employer->telephone = $data['telephone'];
495 $Employer->code = Tools::generator_id(10); 503 $Employer->code = Tools::generator_id(10);
496 $Employer->save(); 504 $Employer->save();
497 505
498 return $Code_user; 506 return $Code_user;
499 } 507 }
500 } 508 }
501 509
502 // Отправка сообщения от работодателя 510 // Отправка сообщения от работодателя
503 public function send_message(MessagesRequiest $request) { 511 public function send_message(MessagesRequiest $request) {
504 $params = $request->all(); 512 $params = $request->all();
505 dd($params); 513 dd($params);
506 $user1 = $params['user_id']; 514 $user1 = $params['user_id'];
507 $user2 = $params['to_user_id']; 515 $user2 = $params['to_user_id'];
508 516
509 if ($request->has('file')) { 517 if ($request->has('file')) {
510 $params['file'] = $request->file('file')->store("messages", 'public'); 518 $params['file'] = $request->file('file')->store("messages", 'public');
511 } 519 }
512 Message::create($params); 520 Message::create($params);
513 return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]); 521 return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]);
514 } 522 }
515 523
516 public function test123(Request $request) { 524 public function test123(Request $request) {
517 $params = $request->all(); 525 $params = $request->all();
518 $user1 = $params['user_id']; 526 $user1 = $params['user_id'];
519 $user2 = $params['to_user_id']; 527 $user2 = $params['to_user_id'];
520 528
521 $rules = [ 529 $rules = [
522 'text' => 'required|min:1|max:150000', 530 'text' => 'required|min:1|max:150000',
523 'file' => 'file|mimes:doc,docx,xlsx,csv,txt,xlx,xls,pdf|max:150000' 531 'file' => 'file|mimes:doc,docx,xlsx,csv,txt,xlx,xls,pdf|max:150000'
524 ]; 532 ];
525 $messages = [ 533 $messages = [
526 'required' => 'Укажите обязательное поле', 534 'required' => 'Укажите обязательное поле',
527 'min' => [ 535 'min' => [
528 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 536 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
529 'integer' => 'Поле «:attribute» должно быть :min или больше', 537 'integer' => 'Поле «:attribute» должно быть :min или больше',
530 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 538 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
531 ], 539 ],
532 'max' => [ 540 'max' => [
533 'string' => 'Поле «:attribute» должно быть не больше :max символов', 541 'string' => 'Поле «:attribute» должно быть не больше :max символов',
534 'integer' => 'Поле «:attribute» должно быть :max или меньше', 542 'integer' => 'Поле «:attribute» должно быть :max или меньше',
535 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 543 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
536 ] 544 ]
537 ]; 545 ];
538 546
539 $validator = Validator::make($request->all(), $rules, $messages); 547 $validator = Validator::make($request->all(), $rules, $messages);
540 548
541 if ($validator->fails()) { 549 if ($validator->fails()) {
542 return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]) 550 return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2])
543 ->withErrors($validator); 551 ->withErrors($validator);
544 } else { 552 } else {
545 if ($request->has('file')) { 553 if ($request->has('file')) {
546 $params['file'] = $request->file('file')->store("messages", 'public'); 554 $params['file'] = $request->file('file')->store("messages", 'public');
547 } 555 }
548 Message::create($params); 556 Message::create($params);
549 return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]); 557 return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]);
550 558
551 } 559 }
552 } 560 }
553 561
554 //Избранные люди 562 //Избранные люди
555 public function favorites(Request $request) { 563 public function favorites(Request $request) {
556 $IP_address = RusDate::ip_addr_client(); 564 $IP_address = RusDate::ip_addr_client();
557 $Arr = Like_worker::Query()->select('code_record')->where('ip_address', '=', $IP_address)->get(); 565 $Arr = Like_worker::Query()->select('code_record')->where('ip_address', '=', $IP_address)->get();
558 566
559 if ($Arr->count()) { 567 if ($Arr->count()) {
560 $A = Array(); 568 $A = Array();
561 foreach ($Arr as $it) { 569 foreach ($Arr as $it) {
562 $A[] = $it->code_record; 570 $A[] = $it->code_record;
563 } 571 }
564 572
565 $Workers = Worker::query()->whereIn('id', $A); 573 $Workers = Worker::query()->whereIn('id', $A);
566 } else { 574 } else {
567 $Workers = Worker::query()->where('id', '=', '0'); 575 $Workers = Worker::query()->where('id', '=', '0');
568 } 576 }
569 577
570 if (($request->has('search')) && (!empty($request->get('search')))) { 578 if (($request->has('search')) && (!empty($request->get('search')))) {
571 $search = $request->get('search'); 579 $search = $request->get('search');
572 580
573 $Workers = $Workers->WhereHas('users', 581 $Workers = $Workers->WhereHas('users',
574 function (Builder $query) use ($search) { 582 function (Builder $query) use ($search) {
575 $query->Where('surname', 'LIKE', "%$search%") 583 $query->Where('surname', 'LIKE', "%$search%")
576 ->orWhere('name_man', 'LIKE', "%$search%") 584 ->orWhere('name_man', 'LIKE', "%$search%")
577 ->orWhere('surname2', 'LIKE', "%$search%"); 585 ->orWhere('surname2', 'LIKE', "%$search%");
578 }); 586 });
579 } else { 587 } else {
580 $Workers = $Workers->with('users'); 588 $Workers = $Workers->with('users');
581 } 589 }
582 590
583 $Workers = $Workers->get(); 591 $Workers = $Workers->get();
584 592
585 593
586 return view('employers.favorite', compact('Workers')); 594 return view('employers.favorite', compact('Workers'));
587 } 595 }
588 596
589 // База данных 597 // База данных
590 public function bd(Request $request) { 598 public function bd(Request $request) {
591 // для типа BelongsTo 599 // для типа BelongsTo
592 //$documents = Document::query()->orderBy(Location::select('name') 600 //$documents = Document::query()->orderBy(Location::select('name')
593 // ->whereColumn('locations.id', 'documents.location_id') 601 // ->whereColumn('locations.id', 'documents.location_id')
594 //); 602 //);
595 603
596 // для типа HasOne/Many 604 // для типа HasOne/Many
597 // $documents = Document::::query()->orderBy(Location::select('name') 605 // $documents = Document::::query()->orderBy(Location::select('name')
598 // ->whereColumn('locations.document_id', 'documents.id') 606 // ->whereColumn('locations.document_id', 'documents.id')
599 //); 607 //);
600 608
601 609
602 $users = User_Model::query()->with('workers'); 610 $users = User_Model::query()->with('workers');
603 611
604 if ($request->has('search')) { 612 if ($request->has('search')) {
605 $find_key = $request->get('search'); 613 $find_key = $request->get('search');
606 $users = $users->where('name', 'LIKE', "%$find_key%") 614 $users = $users->where('name', 'LIKE', "%$find_key%")
607 ->orWhere('surname', 'LIKE', "%$find_key%") 615 ->orWhere('surname', 'LIKE', "%$find_key%")
608 ->orWhere('name_man', 'LIKE', "%$find_key%") 616 ->orWhere('name_man', 'LIKE', "%$find_key%")
609 ->orWhere('email', 'LIKE', "%$find_key%") 617 ->orWhere('email', 'LIKE', "%$find_key%")
610 ->orWhere('telephone', 'LIKE', "%$find_key%"); 618 ->orWhere('telephone', 'LIKE', "%$find_key%");
611 } 619 }
612 620
613 // Данные 621 // Данные
614 $users = $users->Baseuser()-> 622 $users = $users->Baseuser()->
615 orderBy(Worker::select('position_work')->whereColumn('Workers.user_id', 'users.id')); 623 orderBy(Worker::select('position_work')->whereColumn('Workers.user_id', 'users.id'));
616 $count_users = $users; 624 $count_users = $users;
617 $users = $users->paginate(5); 625 $users = $users->paginate(5);
618 626
619 627
620 return view('employers.bd', compact('users', 'count_users')); 628 return view('employers.bd', compact('users', 'count_users'));
621 } 629 }
622 630
623 //Настройка уведомлений 631 //Настройка уведомлений
624 public function subscribe() { 632 public function subscribe() {
625 return view('employers.subcribe'); 633 return view('employers.subcribe');
626 } 634 }
627 635
628 //Установка уведомлений сохранение 636 //Установка уведомлений сохранение
629 public function save_subscribe(Request $request) { 637 public function save_subscribe(Request $request) {
630 dd($request->all()); 638 dd($request->all());
631 $msg = $request->validate([ 639 $msg = $request->validate([
632 'subscribe_email' => 'required|email|min:5|max:255', 640 'subscribe_email' => 'required|email|min:5|max:255',
633 ]); 641 ]);
634 return redirect()->route('employer.subscribe')->with('Вы успешно подписались на рассылку'); 642 return redirect()->route('employer.subscribe')->with('Вы успешно подписались на рассылку');
635 } 643 }
636 644
637 //Сбросить форму с паролем 645 //Сбросить форму с паролем
638 public function password_reset() { 646 public function password_reset() {
639 $email = Auth()->user()->email; 647 $email = Auth()->user()->email;
640 return view('employers.password-reset', compact('email')); 648 return view('employers.password-reset', compact('email'));
641 } 649 }
642 650
643 //Обновление пароля 651 //Обновление пароля
644 public function new_password(Request $request) { 652 public function new_password(Request $request) {
645 $use = Auth()->user(); 653 $use = Auth()->user();
646 $request->validate([ 654 $request->validate([
647 'password' => 'required|string', 655 'password' => 'required|string',
648 'new_password' => 'required|string', 656 'new_password' => 'required|string',
649 'new_password2' => 'required|string' 657 'new_password2' => 'required|string'
650 ]); 658 ]);
651 659
652 if ($request->get('new_password') == $request->get('new_password2')) 660 if ($request->get('new_password') == $request->get('new_password2'))
653 if ($request->get('password') !== $request->get('new_password')) { 661 if ($request->get('password') !== $request->get('new_password')) {
654 $credentials = $request->only('email', 'password'); 662 $credentials = $request->only('email', 'password');
655 if (Auth::attempt($credentials)) { 663 if (Auth::attempt($credentials)) {
656 664
657 if (!is_null($use->email_verified_at)){ 665 if (!is_null($use->email_verified_at)){
658 666
659 $user_data = User_Model::find($use->id); 667 $user_data = User_Model::find($use->id);
660 $user_data->update([ 668 $user_data->update([
661 'password' => Hash::make($request->get('new_password')), 669 'password' => Hash::make($request->get('new_password')),
662 'pubpassword' => base64_encode($request->get('new_password')), 670 'pubpassword' => base64_encode($request->get('new_password')),
663 ]); 671 ]);
664 return redirect() 672 return redirect()
665 ->route('employer.password_reset') 673 ->route('employer.password_reset')
666 ->with('success', 'Поздравляю! Вы обновили свой пароль!'); 674 ->with('success', 'Поздравляю! Вы обновили свой пароль!');
667 } 675 }
668 676
669 return redirect() 677 return redirect()
670 ->route('employer.password_reset') 678 ->route('employer.password_reset')
671 ->withError('Данная учетная запись не было верифицированна!'); 679 ->withError('Данная учетная запись не было верифицированна!');
672 } 680 }
673 } 681 }
674 682
675 return redirect() 683 return redirect()
676 ->route('employer.password_reset') 684 ->route('employer.password_reset')
677 ->withErrors('Не совпадение данных, обновите пароли!'); 685 ->withErrors('Не совпадение данных, обновите пароли!');
678 } 686 }
679 687
680 688
681 689
682 // Форма Удаление пипла 690 // Форма Удаление пипла
683 public function delete_people() { 691 public function delete_people() {
684 $login = Auth()->user()->email; 692 $login = Auth()->user()->email;
685 return view('employers.delete_people', compact('login')); 693 return view('employers.delete_people', compact('login'));
686 } 694 }
687 695
688 // Удаление аккаунта 696 // Удаление аккаунта
689 public function action_delete_user(Request $request) { 697 public function action_delete_user(Request $request) {
690 $Answer = $request->all(); 698 $Answer = $request->all();
691 $user_id = Auth()->user()->id; 699 $user_id = Auth()->user()->id;
692 $request->validate([ 700 $request->validate([
693 'password' => 'required|string', 701 'password' => 'required|string',
694 ]); 702 ]);
695 703
696 $credentials = $request->only('email', 'password'); 704 $credentials = $request->only('email', 'password');
697 if (Auth::attempt($credentials)) { 705 if (Auth::attempt($credentials)) {
698 Auth::logout(); 706 Auth::logout();
699 $it = User_Model::find($user_id); 707 $it = User_Model::find($user_id);
700 $it->delete(); 708 $it->delete();
701 return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт'); 709 return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт');
702 } else { 710 } else {
703 return redirect()->route('employer.delete_people') 711 return redirect()->route('employer.delete_people')
704 ->withErrors( 'Неверный пароль! Нужен корректный пароль'); 712 ->withErrors( 'Неверный пароль! Нужен корректный пароль');
705 } 713 }
706 } 714 }
707 715
708 public function ajax_delete_user(Request $request) { 716 public function ajax_delete_user(Request $request) {
709 $Answer = $request->all(); 717 $Answer = $request->all();
710 $user_id = Auth()->user()->id; 718 $user_id = Auth()->user()->id;
711 $request->validate([ 719 $request->validate([
712 'password' => 'required|string', 720 'password' => 'required|string',
713 ]); 721 ]);
714 $credentials = $request->only('email', 'password'); 722 $credentials = $request->only('email', 'password');
715 if (Auth::attempt($credentials)) { 723 if (Auth::attempt($credentials)) {
716 724
717 return json_encode(Array('SUCCESS' => 'Вы успешно удалили свой аккаунт', 725 return json_encode(Array('SUCCESS' => 'Вы успешно удалили свой аккаунт',
718 'email' => $request->get('email'), 726 'email' => $request->get('email'),
719 'password' => $request->get('password'))); 727 'password' => $request->get('password')));
720 } else { 728 } else {
721 return json_encode(Array('ERROR' => 'Неверный пароль! Нужен корректный пароль')); 729 return json_encode(Array('ERROR' => 'Неверный пароль! Нужен корректный пароль'));
722 } 730 }
723 } 731 }
724 732
725 // FAQ - Вопросы/ответы для работодателей и соискателей 733 // FAQ - Вопросы/ответы для работодателей и соискателей
726 public function faq() { 734 public function faq() {
727 return view('employers.faq'); 735 return view('employers.faq');
728 } 736 }
729 737
730 // Рассылка сообщений 738 // Рассылка сообщений
731 public function send_all_messages() { 739 public function send_all_messages() {
740 $id = Auth()->user()->id;
741 $sending = Employer::query()->where('id', '=', "$id")->first();
742 if ($sending->sending_is)
743 return view('employers.send_all');
744 else
732 return view('employers.send_all'); 745 return view('employers.send_all_danger');
733 } 746 }
734 747
735 // Отправка сообщений для информации 748 // Отправка сообщений для информации
736 public function send_all_post(Request $request) { 749 public function send_all_post(Request $request) {
737 $data = $request->all(); 750 $data = $request->all();
738 751
739 $emails = User_Model::query()->where('is_worker', '1')->get(); 752 $emails = User_Model::query()->where('is_worker', '1')->get();
740 753
741 foreach ($emails as $e) { 754 foreach ($emails as $e) {
742 Mail::to($e->email)->send(new SendAllMessages($data)); 755 Mail::to($e->email)->send(new SendAllMessages($data));
743 } 756 }
744 757
745 return redirect()->route('employer.send_all_messages')->with('success', 'Письма были отправлены'); 758 return redirect()->route('employer.send_all_messages')->with('success', 'Письма были отправлены');
746 } 759 }
747 760
748 // База резюме 761 // База резюме
749 public function bd_tupe(Request $request) { 762 public function bd_tupe(Request $request) {
750 $Resume = User_Model::query()->with('workers')->where('is_bd', '=', '1')->get(); 763 $Resume = User_Model::query()->with('workers')->where('is_bd', '=', '1')->get();
751 764
752 return view('employers.bd_tupe', compact('Resume')); 765 return view('employers.bd_tupe', compact('Resume'));
753 } 766 }
754 767
755 ////////////////////////////////////////////////////////////////// 768 //////////////////////////////////////////////////////////////////
756 // Отправил сообщение 769 // Отправил сообщение
757 ////////////////////////////////////////////////////////////////// 770 //////////////////////////////////////////////////////////////////
758 public function new_message(Request $request) { 771 public function new_message(Request $request) {
759 $params = $request->all(); 772 $params = $request->all();
760 $id = $params['_user_id']; 773 $id = $params['_user_id'];
761 $message = new Message(); 774 $message = new Message();
762 $message->user_id = $params['_user_id']; 775 $message->user_id = $params['_user_id'];
763 $message->to_user_id = $params['_to_user_id']; 776 $message->to_user_id = $params['_to_user_id'];
764 $message->title = $params['title']; 777 $message->title = $params['title'];
765 $message->text = $params['text']; 778 $message->text = $params['text'];
766 if ($request->has('_file')) { 779 if ($request->has('_file')) {
767 $message->file = $request->file('_file')->store("worker/$id", 'public'); 780 $message->file = $request->file('_file')->store("worker/$id", 'public');
768 } 781 }
769 $message->ad_employer_id = $params['_vacancy']; 782 $message->ad_employer_id = $params['_vacancy'];
770 $message->flag_new = 1; 783 $message->flag_new = 1;
771 $id_message = $message->save(); 784 $id_message = $message->save();
772 785
773 //$data['message_id'] = $id_message; 786 //$data['message_id'] = $id_message;
774 //$data['ad_employer_id'] = $params['_vacancy']; 787 //$data['ad_employer_id'] = $params['_vacancy'];
775 //$data['job_title_id'] = 0; 788 //$data['job_title_id'] = 0;
776 789
777 $data['flag'] = 1; 790 $data['flag'] = 1;
778 //$ad_responce = ad_response::create($data); 791 //$ad_responce = ad_response::create($data);
779 return redirect()->route('employer.messages', ['type_message' => 'output']); 792 return redirect()->route('employer.messages', ['type_message' => 'output']);
780 } 793 }
781 794
782 // Восстановление пароля 795 // Восстановление пароля
783 public function repair_password(Request $request) { 796 public function repair_password(Request $request) {
784 $params = $request->get('email'); 797 $params = $request->get('email');
785 } 798 }
786 799
787 // Избранные люди на корабль 800 // Избранные люди на корабль
788 public function selected_people(Request $request) { 801 public function selected_people(Request $request) {
789 $id = $request->get('id'); 802 $id = $request->get('id');
790 $favorite_people = Job_title::query()->Notbdif()->where('is_remove', '=', '0')->where('position_id', $id)->get(); 803 $favorite_people = Job_title::query()->Notbdif()->where('is_remove', '=', '0')->where('position_id', $id)->get();
791 return view('favorite_people', compact('favorite_people')); 804 return view('favorite_people', compact('favorite_people'));
792 } 805 }
793 } 806 }
794 807
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/Controllers/WorkerController.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\Http\Requests\DocumentsRequest; 6 use App\Http\Requests\DocumentsRequest;
7 use App\Http\Requests\PrevCompanyRequest; 7 use App\Http\Requests\PrevCompanyRequest;
8 use App\Http\Requests\SertificationRequest; 8 use App\Http\Requests\SertificationRequest;
9 use App\Models\Ad_employer; 9 use App\Models\Ad_employer;
10 use App\Models\ad_response; 10 use App\Models\ad_response;
11 use App\Models\Category; 11 use App\Models\Category;
12 use App\Models\Dop_info; 12 use App\Models\Dop_info;
13 use App\Models\Employer; 13 use App\Models\Employer;
14 use App\Models\infobloks; 14 use App\Models\infobloks;
15 use App\Models\Job_title; 15 use App\Models\Job_title;
16 use App\Models\Like_vacancy; 16 use App\Models\Like_vacancy;
17 use App\Models\Like_worker; 17 use App\Models\Like_worker;
18 use App\Models\Message; 18 use App\Models\Message;
19 use App\Models\place_works; 19 use App\Models\place_works;
20 use App\Models\PrevCompany; 20 use App\Models\PrevCompany;
21 use App\Models\reclame; 21 use App\Models\reclame;
22 use App\Models\ResponseWork; 22 use App\Models\ResponseWork;
23 use App\Models\sertification; 23 use App\Models\sertification;
24 use App\Models\Static_worker; 24 use App\Models\Static_worker;
25 use App\Models\Title_worker; 25 use App\Models\Title_worker;
26 use App\Models\User; 26 use App\Models\User;
27 use App\Models\User as User_Model; 27 use App\Models\User as User_Model;
28 use App\Models\Worker; 28 use App\Models\Worker;
29 use Barryvdh\DomPDF\Facade\Pdf; 29 use Barryvdh\DomPDF\Facade\Pdf;
30 use Carbon\Carbon; 30 use Carbon\Carbon;
31 use Illuminate\Auth\Events\Registered; 31 use Illuminate\Auth\Events\Registered;
32 use Illuminate\Database\Eloquent\Builder; 32 use Illuminate\Database\Eloquent\Builder;
33 use Illuminate\Database\Eloquent\Model; 33 use Illuminate\Database\Eloquent\Model;
34 use Illuminate\Http\JsonResponse; 34 use Illuminate\Http\JsonResponse;
35 use Illuminate\Http\Request; 35 use Illuminate\Http\Request;
36 use Illuminate\Support\Facades\Auth; 36 use Illuminate\Support\Facades\Auth;
37 use Illuminate\Support\Facades\Hash; 37 use Illuminate\Support\Facades\Hash;
38 use Illuminate\Support\Facades\Storage; 38 use Illuminate\Support\Facades\Storage;
39 use Illuminate\Support\Facades\Validator; 39 use Illuminate\Support\Facades\Validator;
40 40
41 class WorkerController extends Controller 41 class WorkerController extends Controller
42 { 42 {
43 public $status_work = array(0 => 'Ищу работу', 1 => 'Не указано', 2 => 'Не ищу работу'); 43 public $status_work = array(0 => 'Ищу работу', 1 => 'Не указано', 2 => 'Не ищу работу');
44 44
45 //профиль 45 //профиль
46 public function profile(Worker $worker) 46 public function profile(Worker $worker)
47 { 47 {
48 $get_date = date('Y.m'); 48 $get_date = date('Y.m');
49 49
50 $c = Static_worker::query()->where('year_month', '=', $get_date) 50 $c = Static_worker::query()->where('year_month', '=', $get_date)
51 ->where('user_id', '=', $worker->users->id) 51 ->where('user_id', '=', $worker->users->id)
52 ->get(); 52 ->get();
53 53
54 if ($c->count() > 0) { 54 if ($c->count() > 0) {
55 $upd = Static_worker::find($c[0]->id); 55 $upd = Static_worker::find($c[0]->id);
56 $upd->lookin = $upd->lookin + 1; 56 $upd->lookin = $upd->lookin + 1;
57 $upd->save(); 57 $upd->save();
58 } else { 58 } else {
59 $crt = new Static_worker(); 59 $crt = new Static_worker();
60 $crt->lookin = 1; 60 $crt->lookin = 1;
61 $crt->year_month = $get_date; 61 $crt->year_month = $get_date;
62 $crt->user_id = $worker->user_id; 62 $crt->user_id = $worker->user_id;
63 $crt->save(); 63 $crt->save();
64 } 64 }
65 65
66 $stat = Static_worker::query()->where('year_month', '=', $get_date) 66 $stat = Static_worker::query()->where('year_month', '=', $get_date)
67 ->where('user_id', '=', $worker->users->id) 67 ->where('user_id', '=', $worker->users->id)
68 ->get(); 68 ->get();
69 69
70 return view('public.workers.profile', compact('worker', 'stat')); 70 return view('public.workers.profile', compact('worker', 'stat'));
71 } 71 }
72 72
73 // лист база резюме 73 // лист база резюме
74 public function bd_resume(Request $request) 74 public function bd_resume(Request $request)
75 { 75 {
76 $look = false;
77 $idiot = 0;
76 if (isset(Auth()->user()->id)) { 78 if (isset(Auth()->user()->id)) {
77 $idiot = Auth()->user()->id; 79 $idiot = Auth()->user()->id;
78 } else { 80 if ((!Auth()->user()->is_worker) && (Auth()->user()->is_lookin))
79 $idiot = 0; 81 $look = true;
80 } 82 }
81 83
82 $status_work = $this->status_work; 84 if ($look) {
83 $resumes = Worker::query()->with('users')->with('job_titles'); 85 $status_work = $this->status_work;
84 $resumes = $resumes->whereHas('users', function (Builder $query) { 86 $resumes = Worker::query()->with('users')->with('job_titles');
85 $query->Where('is_worker', '=', '1') 87 $resumes = $resumes->whereHas('users', function (Builder $query) {
86 ->Where('is_bd', '=', '0'); 88 $query->Where('is_worker', '=', '1')
87 }); 89 ->Where('is_bd', '=', '0');
88
89 //dd($request->get('job'));
90 if (($request->has('job')) && ($request->get('job') > 0)) {
91 $resumes = $resumes->whereHas('job_titles', function(Builder $query) use ($request) {
92 $query->Where('job_titles.id', $request->get('job'));
93 }); 90 });
94 }
95 91
96 $Job_title = Job_title::query()->get(); 92 //dd($request->get('job'));
97 93 if (($request->has('job')) && ($request->get('job') > 0)) {
98 if ($request->get('sort')) { 94 $resumes = $resumes->whereHas('job_titles', function (Builder $query) use ($request) {
99 $sort = $request->get('sort'); 95 $query->Where('job_titles.id', $request->get('job'));
100 switch ($sort) { 96 });
101 case 'name_up':
102 $resumes = $resumes->orderBy(User::select('surname')
103 ->whereColumn('Workers.user_id', 'users.id')
104 );
105 break;
106 case 'name_down':
107 $resumes = $resumes->orderByDesc(User::select('surname')
108 ->whereColumn('Workers.user_id', 'users.id')
109 );
110 break;
111 case 'created_at_up': $resumes = $resumes->OrderBy('created_at')->orderBy('id'); break;
112 case 'created_at_down': $resumes = $resumes->orderByDesc('created_at')->orderBy('id'); break;
113 case 'default': $resumes = $resumes->orderBy('id')->orderby('updated_at'); break;
114 default: $resumes = $resumes->orderBy('id')->orderby('updated_at'); break;
115 } 97 }
116 }
117 98
118 $res_count = $resumes->count(); 99 $Job_title = Job_title::query()->get();
119 //$resumes = $resumes->get();
120 100
121 $resumes = $resumes->paginate(4); 101 if ($request->get('sort')) {
122 if ($request->ajax()) { 102 $sort = $request->get('sort');
123 // Условия обставлены 103 switch ($sort) {
124 if ($request->has('block') && ($request->get('block') == 1)) { 104 case 'name_up':
125 return view('ajax.resume_1', compact('resumes', 'status_work', 'res_count', 'idiot')); 105 $resumes = $resumes->orderBy(User::select('surname')
106 ->whereColumn('Workers.user_id', 'users.id')
107 );
108 break;
109 case 'name_down':
110 $resumes = $resumes->orderByDesc(User::select('surname')
111 ->whereColumn('Workers.user_id', 'users.id')
112 );
113 break;
114 case 'created_at_up':
115 $resumes = $resumes->OrderBy('created_at')->orderBy('id');
116 break;
117 case 'created_at_down':
118 $resumes = $resumes->orderByDesc('created_at')->orderBy('id');
119 break;
120 case 'default':
121 $resumes = $resumes->orderBy('id')->orderby('updated_at');
122 break;
123 default:
124 $resumes = $resumes->orderBy('id')->orderby('updated_at');
125 break;
126 }
126 } 127 }
127 128
128 if ($request->has('block') && ($request->get('block') == 2)) { 129 $res_count = $resumes->count();
129 return view('ajax.resume_2', compact('resumes', 'status_work', 'res_count', 'idiot')); 130 //$resumes = $resumes->get();
131 $resumes = $resumes->paginate(4);
132 if ($request->ajax()) {
133 // Условия обставлены
134 if ($request->has('block') && ($request->get('block') == 1)) {
135 return view('ajax.resume_1', compact('resumes', 'status_work', 'res_count', 'idiot'));
136 }
137
138 if ($request->has('block') && ($request->get('block') == 2)) {
139 return view('ajax.resume_2', compact('resumes', 'status_work', 'res_count', 'idiot'));
140 }
141 } else {
142 return view('resume', compact('resumes', 'status_work', 'res_count', 'idiot', 'Job_title'));
130 } 143 }
131 } else { 144 } else {
132 return view('resume', compact('resumes', 'status_work', 'res_count', 'idiot', 'Job_title')); 145 return redirect()->route('index')->withErrors(['errors' => ['Вы не можете просматривать базу резюме. Подробнее в меню: "Условия размещения"']]);
133 } 146 }
134 } 147 }
135 148
136 //Лайк резюме 149 //Лайк резюме
137 public function like_controller() { 150 public function like_controller() {
138 151
139 } 152 }
140 153
141 // анкета соискателя 154 // анкета соискателя
142 public function resume_profile(Worker $worker) 155 public function resume_profile(Worker $worker)
143 { 156 {
144 if (isset(Auth()->user()->id)) { 157 if (isset(Auth()->user()->id)) {
145 $idiot = Auth()->user()->id; 158 $idiot = Auth()->user()->id;
146 } else { 159 } else {
147 $idiot = 0; 160 $idiot = 0;
148 } 161 }
149 162
150 $status_work = $this->status_work; 163 $status_work = $this->status_work;
151 $Query = Worker::query()->with('users')->with('job_titles') 164 $Query = Worker::query()->with('users')->with('job_titles')
152 ->with('place_worker')->with('sertificate')->with('prev_company') 165 ->with('place_worker')->with('sertificate')->with('prev_company')
153 ->with('infobloks'); 166 ->with('infobloks');
154 $Query = $Query->where('id', '=', $worker->id); 167 $Query = $Query->where('id', '=', $worker->id);
155 $Query = $Query->get(); 168 $Query = $Query->get();
156 169
157 $get_date = date('Y.m'); 170 $get_date = date('Y.m');
158 $c = Static_worker::query()->where('year_month', '=', $get_date) 171 $c = Static_worker::query()->where('year_month', '=', $get_date)
159 ->where('user_id', '=', $worker->id) 172 ->where('user_id', '=', $worker->id)
160 ->get(); 173 ->get();
161 174
162 if ($c->count() > 0) { 175 if ($c->count() > 0) {
163 $upd = Static_worker::find($c[0]->id); 176 $upd = Static_worker::find($c[0]->id);
164 $upd->lookin = $upd->lookin + 1; 177 $upd->lookin = $upd->lookin + 1;
165 $upd->save(); 178 $upd->save();
166 } else { 179 } else {
167 $crt = new Static_worker(); 180 $crt = new Static_worker();
168 $crt->lookin = 1; 181 $crt->lookin = 1;
169 $crt->year_month = $get_date; 182 $crt->year_month = $get_date;
170 $crt->user_id = $worker->user_id; 183 $crt->user_id = $worker->user_id;
171 $crt->save(); 184 $crt->save();
172 } 185 }
173 $stat = Static_worker::query()->where('year_month', '=', $get_date) 186 $stat = Static_worker::query()->where('year_month', '=', $get_date)
174 ->where('user_id', '=', $worker->id) 187 ->where('user_id', '=', $worker->id)
175 ->get(); 188 ->get();
176 return view('worker', compact('Query', 'status_work', 'idiot')); 189 return view('worker', compact('Query', 'status_work', 'idiot'));
177 } 190 }
178 191
179 // скачать анкету соискателя 192 // скачать анкету соискателя
180 public function resume_download(Worker $worker) 193 public function resume_download(Worker $worker)
181 { 194 {
182 $status_work = $this->status_work; 195 $status_work = $this->status_work;
183 $Query = Worker::query()->with('users')->with('job_titles') 196 $Query = Worker::query()->with('users')->with('job_titles')
184 ->with('place_worker')->with('sertificate')->with('prev_company') 197 ->with('place_worker')->with('sertificate')->with('prev_company')
185 ->with('infobloks'); 198 ->with('infobloks');
186 $Query = $Query->where('id', '=', $worker->id); 199 $Query = $Query->where('id', '=', $worker->id);
187 $Query = $Query->get()->toArray(); 200 $Query = $Query->get()->toArray();
188 201
189 view()->share('Query',$Query); 202 view()->share('Query',$Query);
190 203
191 204
192 $pdf = PDF::loadView('layout.pdf', $Query); //->setPaper('a4', 'landscape'); 205 $pdf = PDF::loadView('layout.pdf', $Query); //->setPaper('a4', 'landscape');
193 206
194 return $pdf->stream(); 207 return $pdf->stream();
195 } 208 }
196 209
197 public function resume_download_all() { 210 public function resume_download_all() {
198 $status_work = $this->status_work; 211 $status_work = $this->status_work;
199 $Query = Worker::query()->with('users')->with('job_titles') 212 $Query = Worker::query()->with('users')->with('job_titles')
200 ->with('place_worker')->with('sertificate')->with('prev_company') 213 ->with('place_worker')->with('sertificate')->with('prev_company')
201 ->with('infobloks')-> 214 ->with('infobloks')->
202 whereHas('users', function (Builder $query) { 215 whereHas('users', function (Builder $query) {
203 $query->Where('is_worker', '=', '1') 216 $query->Where('is_worker', '=', '1')
204 ->Where('is_bd', '=', '1'); 217 ->Where('is_bd', '=', '1');
205 }); 218 });
206 //$Query = $Query->where('id', '=', $worker->id); 219 //$Query = $Query->where('id', '=', $worker->id);
207 $Query = $Query->get()->toArray(); 220 $Query = $Query->get()->toArray();
208 221
209 view()->share('Query',$Query); 222 view()->share('Query',$Query);
210 223
211 $pdf = PDF::loadView('layout.pdf-list-people', $Query); //->setPaper('a4', 'landscape'); 224 $pdf = PDF::loadView('layout.pdf-list-people', $Query); //->setPaper('a4', 'landscape');
212 225
213 return $pdf->stream(); 226 return $pdf->stream();
214 } 227 }
215 228
216 // Кабинет работника 229 // Кабинет работника
217 public function cabinet(Request $request) 230 public function cabinet(Request $request)
218 { 231 {
219 // дата год и месяц 232 // дата год и месяц
220 $get_date = date('Y.m'); 233 $get_date = date('Y.m');
221 234
222 $id = Auth()->user()->id; 235 $id = Auth()->user()->id;
223 236
224 $Infobloks = infobloks::query()->get(); 237 $Infobloks = infobloks::query()->get();
225 238
226 $Worker = Worker::query()->with('users')->with('sertificate')->with('prev_company')-> 239 $Worker = Worker::query()->with('users')->with('sertificate')->with('prev_company')->
227 with('infobloks')->with('place_worker')-> 240 with('infobloks')->with('place_worker')->
228 WhereHas('users', 241 WhereHas('users',
229 function (Builder $query) use ($id) {$query->Where('id', $id); 242 function (Builder $query) use ($id) {$query->Where('id', $id);
230 })->get(); 243 })->get();
231 244
232 $Job_titles = Job_title::query()->where('is_remove', '=', '0')-> 245 $Job_titles = Job_title::query()->where('is_remove', '=', '0')->
233 where('is_bd', '=' , '1')-> 246 where('is_bd', '=' , '1')->
234 OrderBy('name')->get(); 247 OrderBy('name')->get();
235 $Infoblocks = infobloks::query()->OrderBy('name')->get(); 248 $Infoblocks = infobloks::query()->OrderBy('name')->get();
236 249
237 $stat = Static_worker::query()->where('year_month', '=', $get_date) 250 $stat = Static_worker::query()->where('year_month', '=', $get_date)
238 ->where('user_id', '=', $Worker[0]->id) 251 ->where('user_id', '=', $Worker[0]->id)
239 ->get(); 252 ->get();
240 253
241 // 10% 254 // 10%
242 255
243 $persent = 10; 256 $persent = 10;
244 $persent1 = 0; 257 $persent1 = 0;
245 $persent2 = 0; 258 $persent2 = 0;
246 $persent3 = 0; 259 $persent3 = 0;
247 $persent4 = 0; 260 $persent4 = 0;
248 $persent5 = 0; 261 $persent5 = 0;
249 262
250 if ((!empty($Worker[0]->telephone)) && 263 if ((!empty($Worker[0]->telephone)) &&
251 (!empty($Worker[0]->email)) && (!empty($Worker[0]->experience)) && 264 (!empty($Worker[0]->email)) && (!empty($Worker[0]->experience)) &&
252 (!empty($Worker[0]->city)) && (!empty($Worker[0]->old_year))) { 265 (!empty($Worker[0]->city)) && (!empty($Worker[0]->old_year))) {
253 // 40% 266 // 40%
254 $persent = $persent + 40; 267 $persent = $persent + 40;
255 $persent1 = 40; 268 $persent1 = 40;
256 } 269 }
257 270
258 //dd($Worker[0]->status_work, $Worker[0]->telephone, $Worker[0]->email, $Worker[0]->experience, $Worker[0]->city, $Worker[0]->old_year); 271 //dd($Worker[0]->status_work, $Worker[0]->telephone, $Worker[0]->email, $Worker[0]->experience, $Worker[0]->city, $Worker[0]->old_year);
259 272
260 if ($Worker[0]->sertificate->count() > 0) { 273 if ($Worker[0]->sertificate->count() > 0) {
261 // 15% 274 // 15%
262 $persent = $persent + 15; 275 $persent = $persent + 15;
263 $persent2 = 15; 276 $persent2 = 15;
264 } 277 }
265 278
266 if ($Worker[0]->infobloks->count() > 0) { 279 if ($Worker[0]->infobloks->count() > 0) {
267 // 20% 280 // 20%
268 $persent = $persent + 20; 281 $persent = $persent + 20;
269 $persent3 = 20; 282 $persent3 = 20;
270 } 283 }
271 284
272 if ($Worker[0]->prev_company->count() > 0) { 285 if ($Worker[0]->prev_company->count() > 0) {
273 // 10% 286 // 10%
274 $persent = $persent + 10; 287 $persent = $persent + 10;
275 $persent4 = 10; 288 $persent4 = 10;
276 } 289 }
277 290
278 if (!empty($Worker[0]->photo)) { 291 if (!empty($Worker[0]->photo)) {
279 // 5% 292 // 5%
280 $persent = $persent + 5; 293 $persent = $persent + 5;
281 $persent5 = 5; 294 $persent5 = 5;
282 } 295 }
283 if ($request->has('print')) { 296 if ($request->has('print')) {
284 dd($Worker); 297 dd($Worker);
285 } else { 298 } else {
286 return view('workers.cabinet', compact('Worker', 'Infobloks', 'persent', 'Job_titles', 'Infoblocks', 'stat')); 299 return view('workers.cabinet', compact('Worker', 'Infobloks', 'persent', 'Job_titles', 'Infoblocks', 'stat'));
287 } 300 }
288 } 301 }
289 302
290 // Сохранение данных 303 // Сохранение данных
291 public function cabinet_save(Worker $worker, Request $request) 304 public function cabinet_save(Worker $worker, Request $request)
292 { 305 {
293 $id = $worker->id; 306 $id = $worker->id;
294 $params = $request->all(); 307 $params = $request->all();
295 308
296 $job_title_id = $request->get('job_title_id'); 309 $job_title_id = $request->get('job_title_id');
297 310
298 unset($params['new_diplom']); 311 unset($params['new_diplom']);
299 unset($params['new_data_begin']); 312 unset($params['new_data_begin']);
300 unset($params['new_data_end']); 313 unset($params['new_data_end']);
301 unset($params['new_job_title']); 314 unset($params['new_job_title']);
302 unset($params['new_teplohod']); 315 unset($params['new_teplohod']);
303 unset($params['new_GWT']); 316 unset($params['new_GWT']);
304 unset($params['new_KBT']); 317 unset($params['new_KBT']);
305 unset($params['new_Begin_work']); 318 unset($params['new_Begin_work']);
306 unset($params['new_End_work']); 319 unset($params['new_End_work']);
307 unset($params['new_name_company']); 320 unset($params['new_name_company']);
308 321
309 $rules = [ 322 $rules = [
310 'surname' => ['required', 'string', 'max:255'], 323 'surname' => ['required', 'string', 'max:255'],
311 'name_man' => ['required', 'string', 'max:255'], 324 'name_man' => ['required', 'string', 'max:255'],
312 'email' => ['required', 'string', 'email', 'max:255'], 325 'email' => ['required', 'string', 'email', 'max:255'],
313 326
314 ]; 327 ];
315 328
316 $messages = [ 329 $messages = [
317 'required' => 'Укажите обязательное поле', 330 'required' => 'Укажите обязательное поле',
318 'min' => [ 331 'min' => [
319 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 332 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
320 'integer' => 'Поле «:attribute» должно быть :min или больше', 333 'integer' => 'Поле «:attribute» должно быть :min или больше',
321 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 334 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
322 ], 335 ],
323 'max' => [ 336 'max' => [
324 'string' => 'Поле «:attribute» должно быть не больше :max символов', 337 'string' => 'Поле «:attribute» должно быть не больше :max символов',
325 'integer' => 'Поле «:attribute» должно быть :max или меньше', 338 'integer' => 'Поле «:attribute» должно быть :max или меньше',
326 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 339 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
327 ] 340 ]
328 ]; 341 ];
329 342
330 $validator = Validator::make($params, $rules, $messages); 343 $validator = Validator::make($params, $rules, $messages);
331 344
332 if ($validator->fails()) { 345 if ($validator->fails()) {
333 return redirect()->route('worker.cabinet')->withErrors($validator); 346 return redirect()->route('worker.cabinet')->withErrors($validator);
334 } else { 347 } else {
335 348
336 if ($request->has('photo')) { 349 if ($request->has('photo')) {
337 if (!empty($Worker->photo)) { 350 if (!empty($Worker->photo)) {
338 Storage::delete($Worker->photo); 351 Storage::delete($Worker->photo);
339 } 352 }
340 $params['photo'] = $request->file('photo')->store("worker/$id", 'public'); 353 $params['photo'] = $request->file('photo')->store("worker/$id", 'public');
341 } 354 }
342 355
343 if ($request->has('file')) { 356 if ($request->has('file')) {
344 if (!empty($Worker->file)) { 357 if (!empty($Worker->file)) {
345 Storage::delete($Worker->file); 358 Storage::delete($Worker->file);
346 } 359 }
347 $params['file'] = $request->file('file')->store("worker/$id", 'public'); 360 $params['file'] = $request->file('file')->store("worker/$id", 'public');
348 } 361 }
349 362
350 $id_wor = $worker->update($params); 363 $id_wor = $worker->update($params);
351 $use = User::find($worker->user_id); 364 $use = User::find($worker->user_id);
352 $use->surname = $request->get('surname'); 365 $use->surname = $request->get('surname');
353 $use->name_man = $request->get('name_man'); 366 $use->name_man = $request->get('name_man');
354 $use->surname2 = $request->get('surname2'); 367 $use->surname2 = $request->get('surname2');
355 368
356 $use->save(); 369 $use->save();
357 $worker->job_titles()->sync($job_title_id); 370 $worker->job_titles()->sync($job_title_id);
358 371
359 return redirect()->route('worker.cabinet')->with('success', 'Данные были успешно сохранены'); 372 return redirect()->route('worker.cabinet')->with('success', 'Данные были успешно сохранены');
360 } 373 }
361 } 374 }
362 375
363 // Сообщения данные 376 // Сообщения данные
364 public function messages($type_message) 377 public function messages($type_message)
365 { 378 {
366 $user_id = Auth()->user()->id; 379 $user_id = Auth()->user()->id;
367 380
368 $messages_input = Message::query()->with('vacancies')->with('user_from')-> 381 $messages_input = Message::query()->with('vacancies')->with('user_from')->
369 Where('to_user_id', $user_id)->OrderByDesc('created_at'); 382 Where('to_user_id', $user_id)->OrderByDesc('created_at');
370 383
371 $messages_output = Message::query()->with('vacancies')-> 384 $messages_output = Message::query()->with('vacancies')->
372 with('user_to')->where('user_id', $user_id)-> 385 with('user_to')->where('user_id', $user_id)->
373 OrderByDesc('created_at'); 386 OrderByDesc('created_at');
374 387
375 388
376 $count_input = $messages_input->count(); 389 $count_input = $messages_input->count();
377 $count_output = $messages_output->count(); 390 $count_output = $messages_output->count();
378 391
379 if ($type_message == 'input') { 392 if ($type_message == 'input') {
380 $messages = $messages_input->paginate(5); 393 $messages = $messages_input->paginate(5);
381 } 394 }
382 395
383 if ($type_message == 'output') { 396 if ($type_message == 'output') {
384 $messages = $messages_output->paginate(5); 397 $messages = $messages_output->paginate(5);
385 } 398 }
386 399
387 // Вернуть все 100% 400 // Вернуть все 100%
388 return view('workers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id')); 401 return view('workers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id'));
389 } 402 }
390 403
391 // Избранный 404 // Избранный
392 public function favorite() 405 public function favorite()
393 { 406 {
394 return view('workers.favorite'); 407 return view('workers.favorite');
395 } 408 }
396 409
397 // Сменить пароль 410 // Сменить пароль
398 public function new_password() 411 public function new_password()
399 { 412 {
400 $email = Auth()->user()->email; 413 $email = Auth()->user()->email;
401 return view('workers.new_password', compact('email')); 414 return view('workers.new_password', compact('email'));
402 } 415 }
403 416
404 // Обновление пароля 417 // Обновление пароля
405 public function save_new_password(Request $request) { 418 public function save_new_password(Request $request) {
406 $use = Auth()->user(); 419 $use = Auth()->user();
407 $request->validate([ 420 $request->validate([
408 'password' => 'required|string', 421 'password' => 'required|string',
409 'new_password' => 'required|string', 422 'new_password' => 'required|string',
410 'new_password2' => 'required|string' 423 'new_password2' => 'required|string'
411 ]); 424 ]);
412 425
413 if ($request->get('new_password') == $request->get('new_password2')) 426 if ($request->get('new_password') == $request->get('new_password2'))
414 if ($request->get('password') !== $request->get('new_password')) { 427 if ($request->get('password') !== $request->get('new_password')) {
415 $credentials = $request->only('email', 'password'); 428 $credentials = $request->only('email', 'password');
416 if (Auth::attempt($credentials, $request->has('save_me'))) { 429 if (Auth::attempt($credentials, $request->has('save_me'))) {
417 430
418 if (!is_null($use->email_verified_at)){ 431 if (!is_null($use->email_verified_at)){
419 432
420 $user_data = User_Model::find($use->id); 433 $user_data = User_Model::find($use->id);
421 $user_data->update([ 434 $user_data->update([
422 'password' => Hash::make($request->get('new_password')), 435 'password' => Hash::make($request->get('new_password')),
423 'pubpassword' => base64_encode($request->get('new_password')), 436 'pubpassword' => base64_encode($request->get('new_password')),
424 ]); 437 ]);
425 return redirect() 438 return redirect()
426 ->route('worker.new_password') 439 ->route('worker.new_password')
427 ->with('success', 'Поздравляю! Вы обновили свой пароль!'); 440 ->with('success', 'Поздравляю! Вы обновили свой пароль!');
428 } 441 }
429 442
430 return redirect() 443 return redirect()
431 ->route('worker.new_password') 444 ->route('worker.new_password')
432 ->withError('Данная учетная запись не было верифицированна!'); 445 ->withError('Данная учетная запись не было верифицированна!');
433 } 446 }
434 } 447 }
435 448
436 return redirect() 449 return redirect()
437 ->route('worker.new_password') 450 ->route('worker.new_password')
438 ->withErrors('Не совпадение данных, обновите пароли!'); 451 ->withErrors('Не совпадение данных, обновите пароли!');
439 } 452 }
440 453
441 // Удаление профиля форма 454 // Удаление профиля форма
442 public function delete_profile() 455 public function delete_profile()
443 { 456 {
444 $login = Auth()->user()->email; 457 $login = Auth()->user()->email;
445 return view('workers.delete_profile', compact('login')); 458 return view('workers.delete_profile', compact('login'));
446 } 459 }
447 460
448 // Удаление профиля код 461 // Удаление профиля код
449 public function delete_profile_result(Request $request) { 462 public function delete_profile_result(Request $request) {
450 $Answer = $request->all(); 463 $Answer = $request->all();
451 $user_id = Auth()->user()->id; 464 $user_id = Auth()->user()->id;
452 $request->validate([ 465 $request->validate([
453 'password' => 'required|string', 466 'password' => 'required|string',
454 ]); 467 ]);
455 468
456 $credentials = $request->only('email', 'password'); 469 $credentials = $request->only('email', 'password');
457 if (Auth::attempt($credentials)) { 470 if (Auth::attempt($credentials)) {
458 Auth::logout(); 471 Auth::logout();
459 $it = User_Model::find($user_id); 472 $it = User_Model::find($user_id);
460 $it->delete(); 473 $it->delete();
461 return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт'); 474 return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт');
462 } else { 475 } else {
463 return redirect()->route('worker.delete_profile') 476 return redirect()->route('worker.delete_profile')
464 ->withErrors( 'Неверный пароль! Нужен корректный пароль'); 477 ->withErrors( 'Неверный пароль! Нужен корректный пароль');
465 } 478 }
466 } 479 }
467 480
468 // Регистрация соискателя 481 // Регистрация соискателя
469 public function register_worker(Request $request) 482 public function register_worker(Request $request)
470 { 483 {
471 $params = $request->all(); 484 $params = $request->all();
472 $params['is_worker'] = 1; 485 $params['is_worker'] = 1;
473 486
474 $rules = [ 487 $rules = [
475 'surname' => ['required', 'string', 'max:255'], 488 'surname' => ['required', 'string', 'max:255'],
476 'name_man' => ['required', 'string', 'max:255'], 489 'name_man' => ['required', 'string', 'max:255'],
477 'email' => ['required', 'email', 'max:255', 'unique:users'], 490 'email' => ['required', 'email', 'max:255', 'unique:users'],
478 'password' => ['required', 'string', 'min:6'] 491 'password' => ['required', 'string', 'min:6']
479 ]; 492 ];
480 493
481 $messages = [ 494 $messages = [
482 'required' => 'Укажите обязательное поле', 495 'required' => 'Укажите обязательное поле',
483 'min' => [ 496 'min' => [
484 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 497 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
485 'integer' => 'Поле «:attribute» должно быть :min или больше', 498 'integer' => 'Поле «:attribute» должно быть :min или больше',
486 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 499 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
487 ], 500 ],
488 'max' => [ 501 'max' => [
489 'string' => 'Поле «:attribute» должно быть не больше :max символов', 502 'string' => 'Поле «:attribute» должно быть не больше :max символов',
490 'integer' => 'Поле «:attribute» должно быть :max или меньше', 503 'integer' => 'Поле «:attribute» должно быть :max или меньше',
491 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 504 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
492 ] 505 ]
493 ]; 506 ];
494 507
495 $email = $request->get('email'); 508 $email = $request->get('email');
496 if (!preg_match("/^[a-zA-Z0-9_\-.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-.]+$/", $email)) { 509 if (!preg_match("/^[a-zA-Z0-9_\-.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-.]+$/", $email)) {
497 return json_encode(Array("ERROR" => "Error: Отсутствует емайл или некорректный емайл")); 510 return json_encode(Array("ERROR" => "Error: Отсутствует емайл или некорректный емайл"));
498 } 511 }
499 512
500 if ($request->get('password') !== $request->get('confirmed')){ 513 if ($request->get('password') !== $request->get('confirmed')){
501 return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); 514 return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля"));
502 } 515 }
503 516
504 if (strlen($request->get('password')) < 6) { 517 if (strlen($request->get('password')) < 6) {
505 return json_encode(Array("ERROR" => "Error: Недостаточная длина пароля! Увеличьте себе длину пароля!")); 518 return json_encode(Array("ERROR" => "Error: Недостаточная длина пароля! Увеличьте себе длину пароля!"));
506 } 519 }
507 520
508 /*$haystack = $request->get('password'); 521 /*$haystack = $request->get('password');
509 522
510 $specsumbol = Array('!','~', '#', '$', '%', '^', '&', '*', '(', ')', '-', '=', ';', ':', '<', '>', '?'); 523 $specsumbol = Array('!','~', '#', '$', '%', '^', '&', '*', '(', ')', '-', '=', ';', ':', '<', '>', '?');
511 $alpha = Array('Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'Z', 524 $alpha = Array('Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'Z',
512 'X', 'C', 'V', 'B', 'N', 'M'); 525 'X', 'C', 'V', 'B', 'N', 'M');
513 $lenpwd_bool = true; 526 $lenpwd_bool = true;
514 $spec_bool = false; 527 $spec_bool = false;
515 $alpha_bool = false; 528 $alpha_bool = false;
516 529
517 if (strlen($haystack) < 8) $lenpwd_bool = false; 530 if (strlen($haystack) < 8) $lenpwd_bool = false;
518 531
519 foreach ($specsumbol as $it) { 532 foreach ($specsumbol as $it) {
520 if (strpos($haystack, $it) !== false) { 533 if (strpos($haystack, $it) !== false) {
521 $spec_bool = true; 534 $spec_bool = true;
522 } 535 }
523 } 536 }
524 537
525 foreach ($alpha as $it) { 538 foreach ($alpha as $it) {
526 if (strpos($haystack, $it) !== false) { 539 if (strpos($haystack, $it) !== false) {
527 $alpha_bool = true; 540 $alpha_bool = true;
528 } 541 }
529 } 542 }
530 543
531 if ((!$spec_bool) || (!$alpha_bool)) { 544 if ((!$spec_bool) || (!$alpha_bool)) {
532 return json_encode(Array("ERROR" => "Error: Нет спецсимволов в пароле, латинские буквы заглавные, а также один из символов: !~#$%^&*()-=;,:<>?")); 545 return json_encode(Array("ERROR" => "Error: Нет спецсимволов в пароле, латинские буквы заглавные, а также один из символов: !~#$%^&*()-=;,:<>?"));
533 }*/ 546 }*/
534 547
535 if (($request->has('politik')) && ($request->get('politik') == 1)) { 548 if (($request->has('politik')) && ($request->get('politik') == 1)) {
536 $validator = Validator::make($params, $rules, $messages); 549 $validator = Validator::make($params, $rules, $messages);
537 550
538 if ($validator->fails()) { 551 if ($validator->fails()) {
539 return json_encode(array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); 552 return json_encode(array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе."));
540 } else { 553 } else {
541 //dd($params); 554 //dd($params);
542 $user = $this->create($params); 555 $user = $this->create($params);
543 event(new Registered($user)); 556 event(new Registered($user));
544 Auth::guard()->login($user); 557 Auth::guard()->login($user);
545 } 558 }
546 if ($user) { 559 if ($user) {
547 return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl()));; 560 return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl()));;
548 } else { 561 } else {
549 return json_encode(Array("ERROR" => "Error2: Данные были утеряны!")); 562 return json_encode(Array("ERROR" => "Error2: Данные были утеряны!"));
550 } 563 }
551 564
552 } else { 565 } else {
553 return json_encode(Array("ERROR" => "Error3: Вы не согласились с политикой конфидициальности!")); 566 return json_encode(Array("ERROR" => "Error3: Вы не согласились с политикой конфидициальности!"));
554 } 567 }
555 } 568 }
556 569
557 // Звездная оценка и ответ 570 // Звездная оценка и ответ
558 public function stars_answer(Request $request) { 571 public function stars_answer(Request $request) {
559 $params = $request->all(); 572 $params = $request->all();
560 $rules = [ 573 $rules = [
561 'message' => ['required', 'string', 'max:255'], 574 'message' => ['required', 'string', 'max:255'],
562 ]; 575 ];
563 576
564 $messages = [ 577 $messages = [
565 'required' => 'Укажите обязательное поле', 578 'required' => 'Укажите обязательное поле',
566 'min' => [ 579 'min' => [
567 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 580 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
568 'integer' => 'Поле «:attribute» должно быть :min или больше', 581 'integer' => 'Поле «:attribute» должно быть :min или больше',
569 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 582 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
570 ], 583 ],
571 'max' => [ 584 'max' => [
572 'string' => 'Поле «:attribute» должно быть не больше :max символов', 585 'string' => 'Поле «:attribute» должно быть не больше :max символов',
573 'integer' => 'Поле «:attribute» должно быть :max или меньше', 586 'integer' => 'Поле «:attribute» должно быть :max или меньше',
574 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 587 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
575 ] 588 ]
576 ]; 589 ];
577 $response_worker = ResponseWork::create($params); 590 $response_worker = ResponseWork::create($params);
578 return redirect()->route('resume_profile', ['worker' => $request->get('worker_id')])->with('success', 'Ваше сообщение было отправлено!'); 591 return redirect()->route('resume_profile', ['worker' => $request->get('worker_id')])->with('success', 'Ваше сообщение было отправлено!');
579 } 592 }
580 593
581 public function TestWorker() 594 public function TestWorker()
582 { 595 {
583 $Use = new User(); 596 $Use = new User();
584 597
585 $Code_user = $Use->create([ 598 $Code_user = $Use->create([
586 'name' => 'surname name_man', 599 'name' => 'surname name_man',
587 'name_man' => 'name_man', 600 'name_man' => 'name_man',
588 'surname' => 'surname', 601 'surname' => 'surname',
589 'surname2' => 'surname2', 602 'surname2' => 'surname2',
590 'subscribe_email' => '1', 603 'subscribe_email' => '1',
591 'email' => 'email@mail.com', 604 'email' => 'email@mail.com',
592 'telephone' => '1234567890', 605 'telephone' => '1234567890',
593 'password' => Hash::make('password'), 606 'password' => Hash::make('password'),
594 'pubpassword' => base64_encode('password'), 607 'pubpassword' => base64_encode('password'),
595 'email_verified_at' => Carbon::now(), 608 'email_verified_at' => Carbon::now(),
596 'is_worker' => 1, 609 'is_worker' => 1,
597 ]); 610 ]);
598 611
599 if ($Code_user->id > 0) { 612 if ($Code_user->id > 0) {
600 $Worker = new Worker(); 613 $Worker = new Worker();
601 $Worker->user_id = $Code_user->id; 614 $Worker->user_id = $Code_user->id;
602 $Worker->position_work = 1; //'job_titles'; 615 $Worker->position_work = 1; //'job_titles';
603 $Worker->email = 'email@email.com'; 616 $Worker->email = 'email@email.com';
604 $Worker->telephone = '1234567890'; 617 $Worker->telephone = '1234567890';
605 $status = $Worker->save(); 618 $status = $Worker->save();
606 619
607 $Title_Worker = new Title_worker(); 620 $Title_Worker = new Title_worker();
608 $Title_Worker->worker_id = $Worker->id; 621 $Title_Worker->worker_id = $Worker->id;
609 $Title_Worker->job_title_id = 1; 622 $Title_Worker->job_title_id = 1;
610 $Title_Worker->save(); 623 $Title_Worker->save();
611 } 624 }
612 } 625 }
613 626
614 // Создание пользователя 627 // Создание пользователя
615 protected function create(array $data) 628 protected function create(array $data)
616 { 629 {
617 $Use = new User(); 630 $Use = new User();
618 631
619 $Code_user = $Use->create([ 632 $Code_user = $Use->create([
620 'name' => $data['surname']." ".$data['name_man'], 633 'name' => $data['surname']." ".$data['name_man'],
621 'name_man' => $data['name_man'], 634 'name_man' => $data['name_man'],
622 'surname' => $data['surname'], 635 'surname' => $data['surname'],
623 'surname2' => $data['surname2'], 636 'surname2' => $data['surname2'],
624 'subscribe_email' => $data['email'], 637 'subscribe_email' => $data['email'],
625 'email' => $data['email'], 638 'email' => $data['email'],
626 'telephone' => $data['telephone'], 639 'telephone' => $data['telephone'],
627 'password' => Hash::make($data['password']), 640 'password' => Hash::make($data['password']),
628 'pubpassword' => base64_encode($data['password']), 641 'pubpassword' => base64_encode($data['password']),
629 'email_verified_at' => Carbon::now(), 642 'email_verified_at' => Carbon::now(),
630 'is_worker' => $data['is_worker'], 643 'is_worker' => $data['is_worker'],
631 ]); 644 ]);
632 645
633 if ($Code_user->id > 0) { 646 if ($Code_user->id > 0) {
634 $Worker = new Worker(); 647 $Worker = new Worker();
635 $Worker->user_id = $Code_user->id; 648 $Worker->user_id = $Code_user->id;
636 $Worker->position_work = $data['job_titles']; 649 $Worker->position_work = $data['job_titles'];
637 $Worker->email = $data['email']; 650 $Worker->email = $data['email'];
638 $Worker->telephone = $data['telephone']; 651 $Worker->telephone = $data['telephone'];
639 $Worker->save(); 652 $Worker->save();
640 653
641 if (isset($Worker->id)) { 654 if (isset($Worker->id)) {
642 $Title_Worker = new Title_worker(); 655 $Title_Worker = new Title_worker();
643 $Title_Worker->worker_id = $Worker->id; 656 $Title_Worker->worker_id = $Worker->id;
644 $Title_Worker->job_title_id = $data['job_titles']; 657 $Title_Worker->job_title_id = $data['job_titles'];
645 $Title_Worker->save(); 658 $Title_Worker->save();
646 } 659 }
647 660
648 return $Code_user; 661 return $Code_user;
649 } 662 }
650 } 663 }
651 664
652 // Вакансии избранные 665 // Вакансии избранные
653 public function colorado(Request $request) { 666 public function colorado(Request $request) {
654 $IP_address = RusDate::ip_addr_client(); 667 $IP_address = RusDate::ip_addr_client();
655 $Arr = Like_vacancy::Query()->select('code_record')->where('ip_address', '=', $IP_address)->get(); 668 $Arr = Like_vacancy::Query()->select('code_record')->where('ip_address', '=', $IP_address)->get();
656 669
657 if ($Arr->count()) { 670 if ($Arr->count()) {
658 $A = Array(); 671 $A = Array();
659 foreach ($Arr as $it) { 672 foreach ($Arr as $it) {
660 $A[] = $it->code_record; 673 $A[] = $it->code_record;
661 } 674 }
662 675
663 $Query = Ad_employer::query()->whereIn('id', $A); 676 $Query = Ad_employer::query()->whereIn('id', $A);
664 } else { 677 } else {
665 $Query = Ad_employer::query()->where('id', '=', '0'); 678 $Query = Ad_employer::query()->where('id', '=', '0');
666 } 679 }
667 680
668 $Query = $Query->with('jobs')-> 681 $Query = $Query->with('jobs')->
669 with('cat')-> 682 with('cat')->
670 with('employer')-> 683 with('employer')->
671 whereHas('jobs_code', function ($query) use ($request) { 684 whereHas('jobs_code', function ($query) use ($request) {
672 if ($request->ajax()) { 685 if ($request->ajax()) {
673 if (null !== ($request->get('job'))) { 686 if (null !== ($request->get('job'))) {
674 $query->where('job_title_id', $request->get('job')); 687 $query->where('job_title_id', $request->get('job'));
675 } 688 }
676 } 689 }
677 })->select('ad_employers.*'); 690 })->select('ad_employers.*');
678 691
679 $Job_title = Job_title::query()->OrderBy('name')->get(); 692 $Job_title = Job_title::query()->OrderBy('name')->get();
680 693
681 $Query_count = $Query->count(); 694 $Query_count = $Query->count();
682 695
683 $Query = $Query->OrderBy('updated_at')->paginate(3); 696 $Query = $Query->OrderBy('updated_at')->paginate(3);
684 697
685 698
686 return view('workers.favorite', compact('Query', 699 return view('workers.favorite', compact('Query',
687 'Query_count', 700 'Query_count',
688 'Job_title')); 701 'Job_title'));
689 702
690 } 703 }
691 704
692 //Переписка 705 //Переписка
693 public function dialog(User_Model $user1, User_Model $user2) { 706 public function dialog(User_Model $user1, User_Model $user2) {
694 if (isset($user2->id)) { 707 if (isset($user2->id)) {
695 $companion = User_Model::query()->with('workers')-> 708 $companion = User_Model::query()->with('workers')->
696 with('employers')-> 709 with('employers')->
697 where('id', $user2->id)->first(); 710 where('id', $user2->id)->first();
698 } 711 }
699 712
700 $Messages = Message::query()->with('response')->where(function($query) use ($user1, $user2) { 713 $Messages = Message::query()->with('response')->where(function($query) use ($user1, $user2) {
701 $query->where('user_id', $user1->id)->where('to_user_id', $user2->id); 714 $query->where('user_id', $user1->id)->where('to_user_id', $user2->id);
702 })->orWhere(function($query) use ($user1, $user2) { 715 })->orWhere(function($query) use ($user1, $user2) {
703 $query->where('user_id', $user2->id)->where('to_user_id', $user1->id); 716 $query->where('user_id', $user2->id)->where('to_user_id', $user1->id);
704 })->OrderBy('created_at')->get(); 717 })->OrderBy('created_at')->get();
705 718
706 $id_vac = null; 719 $id_vac = null;
707 foreach ($Messages as $it) { 720 foreach ($Messages as $it) {
708 if (isset($it->response)) { 721 if (isset($it->response)) {
709 foreach ($it->response as $r) { 722 foreach ($it->response as $r) {
710 if (isset($r->ad_employer_id)) { 723 if (isset($r->ad_employer_id)) {
711 $id_vac = $r->ad_employer_id; 724 $id_vac = $r->ad_employer_id;
712 break; 725 break;
713 } 726 }
714 } 727 }
715 } 728 }
716 if (!is_null($id_vac)) break; 729 if (!is_null($id_vac)) break;
717 } 730 }
718 731
719 $ad_employer = null; 732 $ad_employer = null;
720 if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first(); 733 if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first();
721 $sender = $user1; 734 $sender = $user1;
722 735
723 return view('workers.dialog', compact('companion', 'sender', 'Messages', 'ad_employer')); 736 return view('workers.dialog', compact('companion', 'sender', 'Messages', 'ad_employer'));
724 } 737 }
725 738
726 // Даунылоады 739 // Даунылоады
727 public function download(Worker $worker) { 740 public function download(Worker $worker) {
728 $arr_house = ['0' => 'Проверка, проверка, проверка, проверка, проверка...']; 741 $arr_house = ['0' => 'Проверка, проверка, проверка, проверка, проверка...'];
729 view()->share('house',$arr_house); 742 view()->share('house',$arr_house);
730 $pdf = PDF::loadView('layout.pdf', $arr_house)->setPaper('a4', 'landscape'); 743 $pdf = PDF::loadView('layout.pdf', $arr_house)->setPaper('a4', 'landscape');
731 return $pdf->stream(); 744 return $pdf->stream();
732 } 745 }
733 746
734 // Поднятие анкеты 747 // Поднятие анкеты
735 public function up(Worker $worker) { 748 public function up(Worker $worker) {
736 $worker->updated_at = Carbon::now(); 749 $worker->updated_at = Carbon::now();
737 $worker->save(); 750 $worker->save();
738 // 0 751 // 0
739 return redirect()->route('worker.cabinet')->with('success', 'Ваша анкета была поднята выше остальных'); 752 return redirect()->route('worker.cabinet')->with('success', 'Ваша анкета была поднята выше остальных');
740 } 753 }
741 754
742 // Форма сертификате 755 // Форма сертификате
743 public function new_sertificate(Worker $worker) { 756 public function new_sertificate(Worker $worker) {
744 return view('workers.sertificate_add', compact('worker')); 757 return view('workers.sertificate_add', compact('worker'));
745 } 758 }
746 759
747 // Добавление сертификата 760 // Добавление сертификата
748 public function add_serificate(SertificationRequest $request) { 761 public function add_serificate(SertificationRequest $request) {
749 $params = $request->all(); 762 $params = $request->all();
750 763
751 $Sertificate = new sertification(); 764 $Sertificate = new sertification();
752 $Sertificate->create($params); 765 $Sertificate->create($params);
753 $Docs = sertification::query()->where('worker_id', $request->get('worker_id'))->get(); 766 $Docs = sertification::query()->where('worker_id', $request->get('worker_id'))->get();
754 return redirect()->route('worker.cabinet'); 767 return redirect()->route('worker.cabinet');
755 //return view('ajax.documents', compact('Docs')); 768 //return view('ajax.documents', compact('Docs'));
756 } 769 }
757 770
758 // Удалить сертификат 771 // Удалить сертификат
759 public function delete_sertificate(sertification $doc) { 772 public function delete_sertificate(sertification $doc) {
760 $doc->delete(); 773 $doc->delete();
761 774
762 return redirect()->route('worker.cabinet'); 775 return redirect()->route('worker.cabinet');
763 } 776 }
764 777
765 // Редактирование сертификата 778 // Редактирование сертификата
766 public function edit_sertificate(Worker $worker, sertification $doc) { 779 public function edit_sertificate(Worker $worker, sertification $doc) {
767 return view('workers.sertificate_edit', compact('doc', 'worker')); 780 return view('workers.sertificate_edit', compact('doc', 'worker'));
768 } 781 }
769 782
770 // Редактирование обновление сертификата 783 // Редактирование обновление сертификата
771 public function update_serificate(SertificationRequest $request, sertification $doc) { 784 public function update_serificate(SertificationRequest $request, sertification $doc) {
772 $all = $request->all(); 785 $all = $request->all();
773 $doc->worker_id = $all['worker_id']; 786 $doc->worker_id = $all['worker_id'];
774 $doc->name = $all['name']; 787 $doc->name = $all['name'];
775 $doc->end_begin = $all['end_begin']; 788 $doc->end_begin = $all['end_begin'];
776 $doc->save(); 789 $doc->save();
777 790
778 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись!'); 791 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись!');
779 } 792 }
780 793
781 public function delete_add_diplom(Request $request, Worker $worker) { 794 public function delete_add_diplom(Request $request, Worker $worker) {
782 $infoblok_id = $request->get('infoblok_id'); 795 $infoblok_id = $request->get('infoblok_id');
783 796
784 if (Dop_info::query()->where('worker_id', $worker->id)->where('infoblok_id', $infoblok_id)->count() > 0) 797 if (Dop_info::query()->where('worker_id', $worker->id)->where('infoblok_id', $infoblok_id)->count() > 0)
785 $id = Dop_info::query()->where('worker_id', $worker->id)->where('infoblok_id', $infoblok_id)->delete(); 798 $id = Dop_info::query()->where('worker_id', $worker->id)->where('infoblok_id', $infoblok_id)->delete();
786 else { 799 else {
787 $params['infoblok_id'] = $infoblok_id; 800 $params['infoblok_id'] = $infoblok_id;
788 $params['worker_id'] = $worker->id; 801 $params['worker_id'] = $worker->id;
789 $params['status'] = $request->get('val'); 802 $params['status'] = $request->get('val');
790 $id = Dop_info::create($params); 803 $id = Dop_info::create($params);
791 //$id = $worker->infobloks()->sync([$infoblok_id]); 804 //$id = $worker->infobloks()->sync([$infoblok_id]);
792 } 805 }
793 806
794 //$Infoblocks = infobloks::query()->get(); 807 //$Infoblocks = infobloks::query()->get();
795 return $id; //redirect()->route('worker.cabinet')->getTargetUrl(); //view('workers.ajax.diploms_dop', compact('worker', 'Infoblocks')); 808 return $id; //redirect()->route('worker.cabinet')->getTargetUrl(); //view('workers.ajax.diploms_dop', compact('worker', 'Infoblocks'));
796 } 809 }
797 810
798 811
799 812
800 // Добавление диплома 813 // Добавление диплома
801 public function add_diplom_ajax(Request $request) { 814 public function add_diplom_ajax(Request $request) {
802 // конец 815 // конец
803 $params = $request->all(); 816 $params = $request->all();
804 $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count(); 817 $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count();
805 818
806 if ($count == 0) $dop_info = Dop_info::create($params); 819 if ($count == 0) $dop_info = Dop_info::create($params);
807 $Infoblocks = infobloks::query()->get(); 820 $Infoblocks = infobloks::query()->get();
808 $Worker = Worker::query()->where('id', $request->get('worker_id'))->get(); 821 $Worker = Worker::query()->where('id', $request->get('worker_id'))->get();
809 $data = Dop_info::query()->where('worker_id', $request->has('worker_id')); 822 $data = Dop_info::query()->where('worker_id', $request->has('worker_id'));
810 return view('ajax.dop_info', compact('data', 'Infoblocks', 'Worker')); 823 return view('ajax.dop_info', compact('data', 'Infoblocks', 'Worker'));
811 } 824 }
812 825
813 // Добавление диплома без ajax 826 // Добавление диплома без ajax
814 public function add_diplom(Worker $worker) { 827 public function add_diplom(Worker $worker) {
815 $worker_id = $worker->id; 828 $worker_id = $worker->id;
816 $Infoblocks = infobloks::query()->get(); 829 $Infoblocks = infobloks::query()->get();
817 return view('workers.dop_info', compact('worker_id', 'worker', 'Infoblocks')); 830 return view('workers.dop_info', compact('worker_id', 'worker', 'Infoblocks'));
818 } 831 }
819 // Сохранить 832 // Сохранить
820 // Сохраняю диплом 833 // Сохраняю диплом
821 public function add_diplom_save(Request $request) { 834 public function add_diplom_save(Request $request) {
822 $params = $request->all(); 835 $params = $request->all();
823 $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count(); 836 $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count();
824 if ($count == 0) $dop_info = Dop_info::create($params); 837 if ($count == 0) $dop_info = Dop_info::create($params);
825 return redirect()->route('worker.cabinet'); 838 return redirect()->route('worker.cabinet');
826 } 839 }
827 840
828 // Добавление стандартного документа 841 // Добавление стандартного документа
829 public function add_document(Worker $worker) { 842 public function add_document(Worker $worker) {
830 return view('workers.docs', compact('worker')); 843 return view('workers.docs', compact('worker'));
831 } 844 }
832 845
833 //Сохранение стандартого документа 846 //Сохранение стандартого документа
834 public function add_document_save(DocumentsRequest $request) { 847 public function add_document_save(DocumentsRequest $request) {
835 $params = $request->all(); 848 $params = $request->all();
836 $place_work = place_works::create($params); 849 $place_work = place_works::create($params);
837 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно добавили запись!'); 850 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно добавили запись!');
838 } 851 }
839 852
840 // Редактирование документа 853 // Редактирование документа
841 public function edit_document(place_works $doc, Worker $worker) { 854 public function edit_document(place_works $doc, Worker $worker) {
842 return view('workers.docs-edit', compact('doc', 'worker')); 855 return view('workers.docs-edit', compact('doc', 'worker'));
843 } 856 }
844 857
845 //Сохранение отредактированного документа 858 //Сохранение отредактированного документа
846 public function edit_document_save(DocumentsRequest $request, place_works $doc) { 859 public function edit_document_save(DocumentsRequest $request, place_works $doc) {
847 $params = $request->all(); 860 $params = $request->all();
848 $doc->update($params); 861 $doc->update($params);
849 862
850 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись!'); 863 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись!');
851 } 864 }
852 865
853 // Удаление документа 866 // Удаление документа
854 public function delete_document(place_works $doc) { 867 public function delete_document(place_works $doc) {
855 $doc->delete(); 868 $doc->delete();
856 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно удалили запись!'); 869 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно удалили запись!');
857 } 870 }
858 871
859 //Отправка нового сообщения 872 //Отправка нового сообщения
860 public function new_message(Request $request) { 873 public function new_message(Request $request) {
861 $params = $request->all(); 874 $params = $request->all();
862 875
863 $id = $params['send_user_id']; 876 $id = $params['send_user_id'];
864 $message = new Message(); 877 $message = new Message();
865 $message->user_id = $params['send_user_id']; 878 $message->user_id = $params['send_user_id'];
866 $message->to_user_id = $params['send_to_user_id']; 879 $message->to_user_id = $params['send_to_user_id'];
867 $message->title = $params['send_title']; 880 $message->title = $params['send_title'];
868 $message->text = $params['send_text']; 881 $message->text = $params['send_text'];
869 if ($request->has('send_file')) { 882 if ($request->has('send_file')) {
870 $message->file = $request->file('send_file')->store("worker/$id", 'public'); 883 $message->file = $request->file('send_file')->store("worker/$id", 'public');
871 } 884 }
872 $message->flag_new = 1; 885 $message->flag_new = 1;
873 $id_message = $message->save(); 886 $id_message = $message->save();
874 887
875 $data['message_id'] = $id_message; 888 $data['message_id'] = $id_message;
876 $data['ad_employer_id'] = $params['send_vacancy']; 889 $data['ad_employer_id'] = $params['send_vacancy'];
877 $data['job_title_id'] = $params['send_job_title_id']; 890 $data['job_title_id'] = $params['send_job_title_id'];
878 $data['flag'] = 1; 891 $data['flag'] = 1;
879 $ad_responce = ad_response::create($data); 892 $ad_responce = ad_response::create($data);
880 return redirect()->route('worker.messages', ['type_message' => 'output']); 893 return redirect()->route('worker.messages', ['type_message' => 'output']);
881 } 894 }
882 895
883 // Информация о предыдущих компаниях 896 // Информация о предыдущих компаниях
884 public function new_prev_company(Worker $worker) { 897 public function new_prev_company(Worker $worker) {
885 return view('workers.prev_company_form', compact('worker')); 898 return view('workers.prev_company_form', compact('worker'));
886 } 899 }
887 900
888 // Добавление контакта компании 901 // Добавление контакта компании
889 public function add_prev_company(PrevCompanyRequest $request) { 902 public function add_prev_company(PrevCompanyRequest $request) {
890 // Возвращение параметров 903 // Возвращение параметров
891 $all = $request->all(); 904 $all = $request->all();
892 $PrevCompany = PrevCompany::create($all); 905 $PrevCompany = PrevCompany::create($all);
893 906
894 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись'); 907 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись');
895 } 908 }
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
app/Providers/MyServiceProvider.php
1 <?php 1 <?php
2 2
3 namespace App\Providers; 3 namespace App\Providers;
4 4
5 use App\Models\Company; 5 use App\Models\Company;
6 use App\Models\ContentRoles; 6 use App\Models\ContentRoles;
7 use App\Models\Employer; 7 use App\Models\Employer;
8 use App\Models\Job_title; 8 use App\Models\Job_title;
9 use App\Models\Worker; 9 use App\Models\Worker;
10 use Illuminate\Support\Facades\Auth; 10 use Illuminate\Support\Facades\Auth;
11 use Illuminate\Support\Facades\DB; 11 use Illuminate\Support\Facades\DB;
12 use Illuminate\Support\Facades\View; 12 use Illuminate\Support\Facades\View;
13 use Illuminate\Support\ServiceProvider; 13 use Illuminate\Support\ServiceProvider;
14 14
15 class MyServiceProvider extends ServiceProvider 15 class MyServiceProvider extends ServiceProvider
16 { 16 {
17 /** 17 /**
18 * Register services. 18 * Register services.
19 * 19 *
20 * @return void 20 * @return void
21 */ 21 */
22 public function register() 22 public function register()
23 { 23 {
24 // 24 //
25 } 25 }
26 26
27 /** 27 /**
28 * Bootstrap services. 28 * Bootstrap services.
29 * 29 *
30 * @return void 30 * @return void
31 */ 31 */
32 public function boot() 32 public function boot()
33 { 33 {
34 $views = ['admin.job_titles.parent_id']; 34 $views = ['admin.job_titles.parent_id'];
35 View::composer($views, 35 View::composer($views,
36 function($view) 36 function($view)
37 { 37 {
38 static $items = null; 38 static $items = null;
39 39
40 if (is_null($items)) { 40 if (is_null($items)) {
41 $items = Job_title::query()-> 41 $items = Job_title::query()->
42 orderByDesc('sort')-> 42 orderByDesc('sort')->
43 orderBy('name')-> 43 orderBy('name')->
44 active()-> 44 active()->
45 get(); 45 get();
46 $parent = 0; 46 $parent = 0;
47 $view->with(['items' => $items, 'parent' => $parent]); 47 $view->with(['items' => $items, 'parent' => $parent]);
48 } else { 48 } else {
49 $view->with(['items' => $items]); 49 $view->with(['items' => $items]);
50 } 50 }
51 51
52 } 52 }
53 ); 53 );
54 54
55 $views2 = ['layout.admin', 'admin.index']; 55 $views2 = ['layout.admin', 'admin.index'];
56 56
57 View::composer($views2, 57 View::composer($views2,
58 function($view){ 58 function($view){
59 $id = Auth::user()->id; 59 $id = Auth::user()->id;
60 $is_manager = Auth::user()->is_manager; 60 $is_manager = Auth::user()->is_manager;
61 $admin = Auth::user()->admin; 61 $admin = Auth::user()->admin;
62 62
63 $contents = ContentRoles::query()->get(); 63 $contents = ContentRoles::query()->get();
64 64
65 $query = DB::select(DB::raw('SELECT count(*) as MsgCount 65 $query = DB::select(DB::raw('SELECT count(*) as MsgCount
66 FROM messages m1 66 FROM messages m1
67 Where ((m1.flag_new = 1) and (m1.to_user_id = :uid)) 67 Where ((m1.flag_new = 1) and (m1.to_user_id = :uid))
68 '), ['uid' => $id] 68 '), ['uid' => $id]
69 ); 69 );
70 70
71 $view->with(['MsgCount' => $query[0]->MsgCount, 71 $view->with(['MsgCount' => $query[0]->MsgCount,
72 'UserId' => $id, 72 'UserId' => $id,
73 'is_manager' => $is_manager, 73 'is_manager' => $is_manager,
74 'admin' => $admin, 74 'admin' => $admin,
75 'contents' => $contents]); 75 'contents' => $contents]);
76 } 76 }
77 ); 77 );
78 78
79 $views3 = ['layout.frontend', 'index']; 79 $views3 = ['layout.frontend', 'index'];
80 80
81 View::composer($views3, 81 View::composer($views3,
82 function($view){ 82 function($view){
83 $id = Auth::user(); 83 $id = Auth::user();
84 $companies = Company::query()->limit(1)->get(); 84 $companies = Company::query()->limit(1)->get();
85 $jobs = Job_title::query()->where('is_remove', '=', '0')->get(); 85 $jobs = Job_title::query()->where('is_remove', '=', '0')->get();
86 $view->with(['UserId' => $id, 'companies' => $companies, 'jobs' => $jobs]); 86 $view->with(['UserId' => $id, 'companies' => $companies, 'jobs' => $jobs]);
87 } 87 }
88 ); 88 );
89 89
90 $view1 = ['employers.menu', 'employers.emblema', 'employers.send_all']; 90 $view1 = ['employers.menu', 'employers.emblema', 'employers.send_all'];
91 View::composer($view1, 91 View::composer($view1,
92 function($view){ 92 function($view){
93 $user = Auth::user(); 93 $user = Auth::user();
94 $id = $user->id; 94 $id = $user->id;
95 $employer = Employer::query()->where('user_id', $id)->get(); 95 $employer = Employer::query()->where('user_id', $id)->get();
96 $id_employer = $employer[0]->id; 96 $id_employer = $employer[0]->id;
97 $view->with(['id_employer' => $id_employer, 'Employer' => $employer]); 97 $view->with(['id_employer' => $id_employer, 'Employer' => $employer]);
98 } 98 }
99 ); 99 );
100 100
101 $view_worker = ['workers.emblema']; 101 $view_worker = ['workers.emblema'];
102 View::composer($view_worker, 102 View::composer($view_worker,
103 function($view_worker) { 103 function($view_worker) {
104 $user = Auth::user(); 104 $user = Auth::user();
105 $id = $user->id; 105 $id = $user->id;
106 $Worker = Worker::query()->where('user_id', $id)->get(); 106 $Worker = Worker::query()->where('user_id', $id)->get();
107 if (isset($Worker[0]->id)) { 107 if (isset($Worker[0]->id)) {
108 $id_worker = $Worker[0]->id; 108 $id_worker = $Worker[0]->id;
109 } else { 109 } else {
110 $id_worker = 0; 110 $id_worker = 0;
111 } 111 }
112 $view_worker->with(['id_worker' => $id_worker, 'Worker' => $Worker, 'User' => $user]); 112 $view_worker->with(['id_worker' => $id_worker, 'Worker' => $Worker, 'User' => $user]);
113 } 113 }
114 ); 114 );
115 115
116 $view_job_title = ['modals.register'];
116 $view_job_title = ['modals.register']; 117 View::composer($view_job_title,
117 View::composer($view_job_title, 118 function($view_job_title) {
118 function($view_job_title) { 119 $Job_titles = Job_title::query()->where('is_remove', '=', '0')->
119 $Job_titles = Job_title::query()->where('is_remove', '=', '0')-> 120 where('is_bd', '=' , '1')->get();
120 where('is_bd', '=' , '1')->get(); 121 $view_job_title->with(['Job_titles' => $Job_titles]);
121 $view_job_title->with(['Job_titles' => $Job_titles]); 122 }
122 } 123 );
123 ); 124
124 125 }
125 } 126 }
126 } 127
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/ajax/resume_1.blade.php
1 1
2 @if ($resumes->count()) 2 <div class="main__resume-base-body-item">
3 @foreach ($resumes as $res) 3 <div class="main__resume-base-body-item-buttons">
4 <div class="main__resume-base-body-item"> 4 <button type="button" data-id="{{ $res->id }}" id="elem{{ $res->id }}" class="like js-toggle js_box_favorit {{ \App\Classes\LikesClass::get_status_worker($res) }}" data-val="{{ $res->id }}">
5 <div class="main__resume-base-body-item-buttons"> 5 <svg>
6 <button type="button" class="like js-toggle js_box_favorites <?=\App\Classes\RusDate::selected_item($res->id);?>" data-val="{{ $res->id }}"> 6 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use>
7 <svg> 7 </svg>
8 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> 8 </button>
9 </svg> 9 @guest
10 </button> 10 <button type="button" data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}'
11 <button type="button" class="chat js-toggle js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot}}" data-tuid="{{ $res->id }}" data-options='{"touch":false,"autoFocus":false}'> 11 class="chat js-toggle js_it_button">
12 <svg>
13 <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use>
14 </svg>
15 </button>
16 @else
17 @if (App\Classes\StatusUser::Status()==0)
18 @if ((!Auth()->user()->is_worker) && (Auth()->user()->is_message))
19 <button type="button" class="chat js-toggle js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot}}" data-tuid="{{ $res->users->id }}" data-options='{"touch":false,"autoFocus":false}'>
20 <svg>
21 <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use>
22 </svg>
23 </button>
24 @endif
25 @else
26 <button type="button" data-fancybox data-src="#question2" data-options='{"touch":false,"autoFocus":false}'
27 class="chat js-toggle js_it_button">
12 <svg> 28 <svg>
13 <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use> 29 <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use>
14 </svg> 30 </svg>
15 </button> 31 </button> @endif
32 @endif
33 </div>
34 <div class="main__resume-base-body-item-wrapper">
35 <img src="@isset ($res->photo) {{ asset(Storage::url($res->photo)) }} @else {{ asset('images/default_man.jpg')}} @endif" alt="" class="main__resume-base-body-item-photo">
36 <div class="main__resume-base-body-item-inner">
37 <div>
38 <b>Статус</b>
39 <span>{{ $status_work[$res->status_work] }}</span>
16 </div> 40 </div>
17 <div class="main__resume-base-body-item-wrapper"> 41 <div>
18 <img src="@isset ($res->photo) {{ asset(Storage::url($res->photo)) }} @else {{ asset('images/default_man.jpg')}} @endif" alt="" class="main__resume-base-body-item-photo"> 42 <b>Имя работника</b>
19 <div class="main__resume-base-body-item-inner"> 43 <span>@if (isset($res->users)){{ $res->users->surname." ".$res->users->name_man." ".$res->users->surname2 }} @endif</span>
20 <div>
21 <b>Статус</b>
22 <span>{{ $status_work[$res->status_work] }}</span>
23 </div>
24 <div>
25 <b>Имя работника</b>
26 <span>@if (isset($res->users)){{ $res->users->surname." ".$res->users->name_man." ".$res->users->surname2 }} @endif</span>
27 </div>
28 <div>
29 <b>Номер телефона</b>
30 <span><a href="tel:{{ $res->telephone }}">{{ $res->telephone }}</a></span>
31 </div>
32 <div>
33 <b>Электронный адрес</b>
34 <span><a href="mailto:{{ $res->email }}">{{ $res->email }}</a></span>
35 </div>
36 <div>
37 <b>Город проживания</b>
38 <span>{{ $res->city }}</span>
39 </div>
40 <div>
41 <b>Опыт работы</b>
42 <span>{{ $res->experience }}</span>
43 </div>
44 </div>
45 </div> 44 </div>
46 <div class="main__employer-page-two-item-tags"> 45 <div>
47 @if ($res->job_titles->count()) 46 <b>Номер телефона</b>
48 @if (isset($res->job_titles)) 47 <span><a href="tel:{{ $res->telephone }}">{{ $res->telephone }}</a></span>
49 @foreach ($res->job_titles as $key => $j) 48 </div>
50 <span class="main__employer-page-two-item-tag">#{{ $j->name }}</span> 49 <div>
51 @endforeach 50 <b>Электронный адрес</b>
52 @endif 51 <span><a href="mailto:{{ $res->email }}">{{ $res->email }}</a></span>
53 @endif 52 </div>
53 <div>
54 <b>Город проживания</b>
55 <span>{{ $res->city }}</span>
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/add_vacancy_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' => 2])
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/employers/bd_resume_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/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="Поиск&hellip;" required> 58 <input type="search" class="input" placeholder="Поиск&hellip;" 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>/&nbsp;обновления</th> 89 <th>Дата добавления<br>/&nbsp;обновления</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/menu.blade.php
1 <div class="cabinet__side-item"> 1 <div class="cabinet__side-item">
2 <div class="cabinet__menu"> 2 <div class="cabinet__menu">
3 <button type="button" class="cabinet__menu-toper js-toggle"> 3 <button type="button" class="cabinet__menu-toper js-toggle">
4 <span class="cabinet__menu-toper-text"> 4 <span class="cabinet__menu-toper-text">
5 <i> 5 <i>
6 <svg> 6 <svg>
7 <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use> 7 <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use>
8 </svg> 8 </svg>
9 </i> 9 </i>
10 <span>Профиль</span> 10 <span>Профиль</span>
11 </span> 11 </span>
12 <i class="cabinet__menu-toper-arrow"> 12 <i class="cabinet__menu-toper-arrow">
13 <svg> 13 <svg>
14 <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use> 14 <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use>
15 </svg> 15 </svg>
16 </i> 16 </i>
17 </button> 17 </button>
18 <div class="cabinet__menu-body"> 18 <div class="cabinet__menu-body">
19 <div class="cabinet__menu-items"> 19 <div class="cabinet__menu-items">
20 <a href="{{ route('employer.employer_info') }}" class="cabinet__menu-item @if ($item==0) active @endif"> 20 <a href="{{ route('employer.employer_info') }}" class="cabinet__menu-item @if ($item==0) active @endif">
21 <i> 21 <i>
22 <svg> 22 <svg>
23 <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use> 23 <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use>
24 </svg> 24 </svg>
25 </i> 25 </i>
26 <span>Личные данные</span> 26 <span>Личные данные</span>
27 </a> 27 </a>
28 <a href="{{ route('employer.cabinet') }}" class="cabinet__menu-item @if ($item==1) active @endif"> 28 <a href="{{ route('employer.cabinet') }}" class="cabinet__menu-item @if ($item==1) active @endif">
29 <i> 29 <i>
30 <svg> 30 <svg>
31 <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use> 31 <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use>
32 </svg> 32 </svg>
33 </i> 33 </i>
34 <span>Профиль</span> 34 <span>Профиль</span>
35 </a> 35 </a>
36 @if ((!Auth()->user()->is_worker) && (Auth()->user()->is_public))
36 <a href="{{ route('employer.cabinet_vacancie') }}" class="cabinet__menu-item @if ($item==2) active @endif"> 37 <a href="{{ route('employer.cabinet_vacancie') }}" class="cabinet__menu-item @if ($item==2) active @endif">
37 <i> 38 <i>
38 <svg> 39 <svg>
39 <use xlink:href="{{ asset('images/sprite.svg#cabinet-2') }}"></use> 40 <use xlink:href="{{ asset('images/sprite.svg#cabinet-2') }}"></use>
40 </svg> 41 </svg>
41 </i> 42 </i>
42 <span>Разместить вакансию</span> 43 <span>Разместить вакансию</span>
43 </a> 44 </a>
45 @else
46 <a href="{{ route('employer.cabinet_vacancie_danger') }}" class="cabinet__menu-item @if ($item==2) active @endif">
47 <i>
48 <svg>
49 <use xlink:href="{{ asset('images/sprite.svg#cabinet-2') }}"></use>
50 </svg>
51 </i>
52 <span>Разместить вакансию</span>
53 </a>
54 @endif
44 <a href="{{ route('employer.vacancy_list') }}" class="cabinet__menu-item @if ($item==3) active @endif"> 55 <a href="{{ route('employer.vacancy_list') }}" class="cabinet__menu-item @if ($item==3) active @endif">
45 <i> 56 <i>
46 <svg> 57 <svg>
47 <use xlink:href="{{ asset('images/sprite.svg#cabinet-3') }}"></use> 58 <use xlink:href="{{ asset('images/sprite.svg#cabinet-3') }}"></use>
48 </svg> 59 </svg>
49 </i> 60 </i>
50 <span>Мои вакансии</span> 61 <span>Мои вакансии</span>
51 </a> 62 </a>
52 <a href="{{ route('employer.answers', ['employer' => $id_employer]) }}" class="cabinet__menu-item @if ($item==4) active @endif"> 63 <a href="{{ route('employer.answers', ['employer' => $id_employer]) }}" class="cabinet__menu-item @if ($item==4) active @endif">
53 <i> 64 <i>
54 <svg> 65 <svg>
55 <use xlink:href="{{ asset('images/sprite.svg#cabinet-4') }}"></use> 66 <use xlink:href="{{ asset('images/sprite.svg#cabinet-4') }}"></use>
56 </svg> 67 </svg>
57 </i> 68 </i>
58 <span>Отклики на вакансию</span> 69 <span>Отклики на вакансию</span>
59 </a> 70 </a>
60 <a href="{{ route('employer.messages', ['type_message' => 'input']) }}" class="cabinet__menu-item @if ($item==5) active @endif"> 71 <a href="{{ route('employer.messages', ['type_message' => 'input']) }}" class="cabinet__menu-item @if ($item==5) active @endif">
61 <i> 72 <i>
62 <svg> 73 <svg>
63 <use xlink:href="{{ asset('images/sprite.svg#cabinet-5') }}"></use> 74 <use xlink:href="{{ asset('images/sprite.svg#cabinet-5') }}"></use>
64 </svg> 75 </svg>
65 </i> 76 </i>
66 <span>Сообщения</span> 77 <span>Сообщения</span>
67 </a> 78 </a>
68 <a href="{{ route('employer.favorites') }}" class="cabinet__menu-item @if ($item==6) active @endif"> 79 <a href="{{ route('employer.favorites') }}" class="cabinet__menu-item @if ($item==6) active @endif">
69 <i> 80 <i>
70 <svg> 81 <svg>
71 <use xlink:href="{{ asset('images/sprite.svg#cabinet-6') }}"></use> 82 <use xlink:href="{{ asset('images/sprite.svg#cabinet-6') }}"></use>
72 </svg> 83 </svg>
73 </i> 84 </i>
74 <span>Избранные кандидаты</span> 85 <span>Избранные кандидаты</span>
75 </a> 86 </a>
76 <a href="{{ route('employer.bd') }}" class="cabinet__menu-item @if ($item==7) active @endif"> 87 <a href="{{ route('employer.bd') }}" class="cabinet__menu-item @if ($item==7) active @endif">
77 <i> 88 <i>
78 <svg> 89 <svg>
79 <use xlink:href="{{ asset('images/sprite.svg#cabinet-7')}}"></use> 90 <use xlink:href="{{ asset('images/sprite.svg#cabinet-7')}}"></use>
80 </svg> 91 </svg>
81 </i> 92 </i>
82 <span>База данных</span> 93 <span>База данных</span>
83 </a> 94 </a>
95 @if ((!Auth()->user()->is_worker) && (Auth()->user()->is_lookin))
84 <a href="{{ route('bd_resume') }}" target="_blank" class="cabinet__menu-item @if ($item==8) active @endif"> 96 <a href="{{ route('bd_resume') }}" target="_blank" class="cabinet__menu-item @if ($item==8) active @endif">
85 <i> 97 <i>
86 <svg> 98 <svg>
87 <use xlink:href="{{ asset('images/sprite.svg#cabinet-8') }}"></use> 99 <use xlink:href="{{ asset('images/sprite.svg#cabinet-8') }}"></use>
88 </svg> 100 </svg>
89 </i> 101 </i>
90 <span>База резюме</span> 102 <span>База резюме</span>
91 </a> 103 </a>
104 @else
105 <a href="{{ route('bd_resume_danger') }}" target="_blank" class="cabinet__menu-item @if ($item==8) active @endif">
106 <i>
107 <svg>
108 <use xlink:href="{{ asset('images/sprite.svg#cabinet-8') }}"></use>
109 </svg>
110 </i>
111 <span>База резюме</span>
112 </a>
113 @endif
92 <a href="{{ route('employer.send_all_messages') }}" class="cabinet__menu-item @if ($item==9) active @endif"> 114 <a href="{{ route('employer.send_all_messages') }}" class="cabinet__menu-item @if ($item==9) active @endif">
93 <i> 115 <i>
94 <svg> 116 <svg>
95 <use xlink:href="{{ asset('images/sprite.svg#cabinet-9') }}"></use> 117 <use xlink:href="{{ asset('images/sprite.svg#cabinet-9') }}"></use>
96 </svg> 118 </svg>
97 </i> 119 </i>
98 <span>Рассылка сообщений</span> 120 <span>Рассылка сообщений</span>
99 </a> 121 </a>
100 <a href="{{ route('employer.faq') }}" class="cabinet__menu-item @if ($item==10) active @endif"> 122 <a href="{{ route('employer.faq') }}" class="cabinet__menu-item @if ($item==10) active @endif">
101 <i> 123 <i>
102 <svg> 124 <svg>
103 <use xlink:href="{{ asset('images/sprite.svg#cabinet-10') }}"></use> 125 <use xlink:href="{{ asset('images/sprite.svg#cabinet-10') }}"></use>
104 </svg> 126 </svg>
105 </i> 127 </i>
106 <span>FAQ</span> 128 <span>FAQ</span>
107 </a> 129 </a>
108 <a href="{{ route('employer.subscribe') }}" class="cabinet__menu-item @if ($item==11) active @endif"> 130 <a href="{{ route('employer.subscribe') }}" class="cabinet__menu-item @if ($item==11) active @endif">
109 <i> 131 <i>
110 <svg> 132 <svg>
111 <use xlink:href="{{ asset('images/sprite.svg#cabinet-11') }}"></use> 133 <use xlink:href="{{ asset('images/sprite.svg#cabinet-11') }}"></use>
112 </svg> 134 </svg>
113 </i> 135 </i>
114 <span>Настройки уведомлений</span> 136 <span>Настройки уведомлений</span>
115 </a> 137 </a>
116 <a href="{{ route('employer.slider_flot') }}" class="cabinet__menu-item @if ($item==12) active @endif"> 138 <a href="{{ route('employer.slider_flot') }}" class="cabinet__menu-item @if ($item==12) active @endif">
117 <i> 139 <i>
118 <svg> 140 <svg>
119 <use xlink:href="{{ asset('images/sprite.svg#cabinet-11') }}"></use> 141 <use xlink:href="{{ asset('images/sprite.svg#cabinet-11') }}"></use>
120 </svg> 142 </svg>
121 </i> 143 </i>
122 <span>Мой флот</span> 144 <span>Мой флот</span>
123 </a> 145 </a>
124 <a href="{{ route('employer.password_reset') }}" class="cabinet__menu-item green @if ($item==13) active @endif"> 146 <a href="{{ route('employer.password_reset') }}" class="cabinet__menu-item green @if ($item==13) active @endif">
125 <i></i> 147 <i></i>
126 <span>Сменить пароль</span> 148 <span>Сменить пароль</span>
127 </a> 149 </a>
128 <a href="{{ route('employer.delete_people') }}" class="cabinet__menu-item red @if ($item==14) active @endif"> 150 <a href="{{ route('employer.delete_people') }}" class="cabinet__menu-item red @if ($item==14) active @endif">
129 <i></i> 151 <i></i>
130 <span>Удалить профиль</span> 152 <span>Удалить профиль</span>
131 </a> 153 </a>
132 </div> 154 </div>
133 <div class="cabinet__menu-bottom"> 155 <div class="cabinet__menu-bottom">
134 <a href="{{ route('logout') }}" class="button cabinet__menu-leave"> 156 <a href="{{ route('logout') }}" class="button cabinet__menu-leave">
135 <svg> 157 <svg>
136 <use xlink:href="{{ asset('images/sprite.svg#leave') }}"></use> 158 <use xlink:href="{{ asset('images/sprite.svg#leave') }}"></use>
137 </svg> 159 </svg>
138 Выход 160 Выход
139 </a> 161 </a>
140 <span class="cabinet__menu-copy"> 162 <span class="cabinet__menu-copy">
141 &copy; 2020 &ndash; Rekamore.su 163 &copy; 2020 &ndash; Rekamore.su
142 </span> 164 </span>
143 </div> 165 </div>
144 </div> 166 </div>
145 </div> 167 </div>
146 </div> 168 </div>
147 169
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/index.blade.php
1 @extends('layout.frontend', ['title' => 'Главная страница РекаМоре']) 1 @extends('layout.frontend', ['title' => 'Главная страница РекаМоре'])
2 2
3 @section('scripts') 3 @section('scripts')
4 4
5 @endsection 5 @endsection
6 6
7 @section('content') 7 @section('content')
8 @include('messages_error')
8 <section class="work"> 9 <section class="work">
9 <div class="container"> 10 <div class="container">
10 <img src="{{ asset('images/1.png') }}" alt="" class="work__pic"> 11 <img src="{{ asset('images/1.png') }}" alt="" class="work__pic">
11 <div class="work__body"> 12 <div class="work__body">
12 <div class="work__title"> 13 <div class="work__title">
13 <h4>Работа в море / 14 <h4>Работа в море /
14 <span class="br">Работа на реке</span></h4> 15 <span class="br">Работа на реке</span></h4>
15 </div> 16 </div>
16 <div class="work__text">Профессиональная сеть морского сообщества «RekaMore.su» приветствует вас — 17 <div class="work__text">Профессиональная сеть морского сообщества «RekaMore.su» приветствует вас —
17 тех, кто не представляет себе жизнь без моря, тех, кто готов связать свою жизнь с работой в 18 тех, кто не представляет себе жизнь без моря, тех, кто готов связать свою жизнь с работой в
18 сложных, но очень интересных условиях. </div> 19 сложных, но очень интересных условиях. </div>
19 <div class="work__list"> 20 <div class="work__list">
20 <div>Тысячи соискателей увидят Ваше объявление</div> 21 <div>Тысячи соискателей увидят Ваше объявление</div>
21 <div>Десятки компаний выкладывают объявления каждый день</div> 22 <div>Десятки компаний выкладывают объявления каждый день</div>
22 </div> 23 </div>
23 <form class="search work__form" action="{{ route('search_vacancies') }}" method="GET"> 24 <form class="search work__form" action="{{ route('search_vacancies') }}" method="GET">
24 <input type="search" id="search" name="search" class="input" placeholder="Желаемая должность" required> 25 <input type="search" id="search" name="search" class="input" placeholder="Желаемая должность" required>
25 <button type="submit" class="button button_light">Посмотреть вакансии</button> 26 <button type="submit" class="button button_light">Посмотреть вакансии</button>
26 <span> 27 <span>
27 <svg> 28 <svg>
28 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> 29 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use>
29 </svg> 30 </svg>
30 </span> 31 </span>
31 </form> 32 </form>
32 @guest 33 @guest
33 <a data-fancybox data-src="#question2" data-options='{"touch":false,"autoFocus":false}' class="button work__search">Я ищу сотрудника</a> 34 <a data-fancybox data-src="#question2" data-options='{"touch":false,"autoFocus":false}' class="button work__search">Я ищу сотрудника</a>
34 @else 35 @else
35 <a href="{{ route('bd_resume') }}" class="button work__search">Я ищу сотрудника</a> 36 <a href="{{ route('bd_resume') }}" class="button work__search">Я ищу сотрудника</a>
36 @endguest 37 @endguest
37 <div class="work__get"> 38 <div class="work__get">
38 <b>Скачать приложение</b> 39 <b>Скачать приложение</b>
39 <a href=""> 40 <a href="">
40 <img src="{{ asset('images/google.svg') }}" alt=""> 41 <img src="{{ asset('images/google.svg') }}" alt="">
41 </a> 42 </a>
42 <a href=""> 43 <a href="">
43 <img src="{{ asset('images/apple.svg') }}" alt=""> 44 <img src="{{ asset('images/apple.svg') }}" alt="">
44 </a> 45 </a>
45 </div> 46 </div>
46 </div> 47 </div>
47 </div> 48 </div>
48 </section> 49 </section>
49 <section class="numbers"> 50 <section class="numbers">
50 <div class="container"> 51 <div class="container">
51 <div class="numbers__body"> 52 <div class="numbers__body">
52 <div class="numbers__item"> 53 <div class="numbers__item">
53 <b>500+</b> 54 <b>500+</b>
54 <span>Резюме</span> 55 <span>Резюме</span>
55 Банальные, но неопровержимые выводы, а также элементы политического процесса лишь добавляют 56 Банальные, но неопровержимые выводы, а также элементы политического процесса лишь добавляют
56 фракционных разногласий и призваны к ответу. 57 фракционных разногласий и призваны к ответу.
57 </div> 58 </div>
58 <div class="numbers__item"> 59 <div class="numbers__item">
59 <b>1 000+</b> 60 <b>1 000+</b>
60 <span>Вакансий</span> 61 <span>Вакансий</span>
61 В рамках спецификации современных стандартов, диаграммы связей заблокированы в рамках своих 62 В рамках спецификации современных стандартов, диаграммы связей заблокированы в рамках своих
62 собственных рациональных ограничений. 63 собственных рациональных ограничений.
63 </div> 64 </div>
64 <div class="numbers__item"> 65 <div class="numbers__item">
65 <b>265</b> 66 <b>265</b>
66 <span>Компаний</span> 67 <span>Компаний</span>
67 Но сторонники тоталитаризма в науке заблокированы в рамках своих собственных рациональных 68 Но сторонники тоталитаризма в науке заблокированы в рамках своих собственных рациональных
68 ограничений. 69 ограничений.
69 </div> 70 </div>
70 </div> 71 </div>
71 </div> 72 </div>
72 </section> 73 </section>
73 <!--<section class="vacancies"> 74 <!--<section class="vacancies">
74 <div class="container"> 75 <div class="container">
75 <div class="title"><h4>Новые вакансии</h4></div> 76 <div class="title"><h4>Новые вакансии</h4></div>
76 <div class="vacancies__body"> 77 <div class="vacancies__body">
77 <a class="vacancies__more button button_light js-parent-toggle" href="{{ route('vacancies') }}">Все должности</a> 78 <a class="vacancies__more button button_light js-parent-toggle" href="{{ route('vacancies') }}">Все должности</a>
78 <div class="vacancies__list"> 79 <div class="vacancies__list">
79 _if ($categories->count()) 80 _if ($categories->count())
80 _foreach ($categories as $cat) 81 _foreach ($categories as $cat)
81 <a href=" route('list-vacancies', ['categories' => $cat->id]) }}" class="vacancies__item"> 82 <a href=" route('list-vacancies', ['categories' => $cat->id]) }}" class="vacancies__item">
82 <span style="border-color:#F4C4C2"> 83 <span style="border-color:#F4C4C2">
83 <b> $cat->name }}</b> 84 <b> $cat->name }}</b>
84 <i>Вакансий: <span> $cat->cnt }}</span></i> 85 <i>Вакансий: <span> $cat->cnt }}</span></i>
85 </span> 86 </span>
86 </a> 87 </a>
87 _endforeach 88 _endforeach
88 _else 89 _else
89 Тут пока нет никаких вакансий 90 Тут пока нет никаких вакансий
90 _endif 91 _endif
91 </div> 92 </div>
92 </div> 93 </div>
93 </div> 94 </div>
94 </section>--> 95 </section>-->
95 96
96 <main class="main"> 97 <main class="main">
97 <div class="container"> 98 <div class="container">
98 <div class="main__vacancies"> 99 <div class="main__vacancies">
99 <h2 class="main__vacancies-title">Категории вакансий</h2> 100 <h2 class="main__vacancies-title">Категории вакансий</h2>
100 <div class="vacancies__body"> 101 <div class="vacancies__body">
101 <div class="vacancies__list" id="block_ajax" name="block_ajax"> 102 <div class="vacancies__list" id="block_ajax" name="block_ajax">
102 @foreach($Main_Job as $key => $it_main) 103 @foreach($Main_Job as $key => $it_main)
103 <div class="vacancies__list-col"> 104 <div class="vacancies__list-col">
104 @include('block_real_new', ['it_main' => $it_main, 'category' => $key]) 105 @include('block_real_new', ['it_main' => $it_main, 'category' => $key])
105 </div> 106 </div>
106 @endforeach 107 @endforeach
107 <!--_include('block_real', ['flot' => $flot, 'position' => $Position[$flot->position_id]])--> 108 <!--_include('block_real', ['flot' => $flot, 'position' => $Position[$flot->position_id]])-->
108 </div> 109 </div>
109 </div> 110 </div>
110 </div> 111 </div>
111 </div> 112 </div>
112 </main> 113 </main>
113 114
114 <section class="employer"> 115 <section class="employer">
115 <div class="container"> 116 <div class="container">
116 <div class="title"><h4>Работодатели</h4></div> 117 <div class="title"><h4>Работодатели</h4></div>
117 <div class="swiper js-employer-swiper"> 118 <div class="swiper js-employer-swiper">
118 <div class="swiper-wrapper"> 119 <div class="swiper-wrapper">
119 120
120 @if ($employers->count()) 121 @if ($employers->count())
121 @php 122 @php
122 $rec = 0; 123 $rec = 0;
123 $count = $employers->count(); 124 $count = $employers->count();
124 125
125 @endphp 126 @endphp
126 127
127 @foreach($employers as $emp) 128 @foreach($employers as $emp)
128 @php $rec++ @endphp 129 @php $rec++ @endphp
129 @if (($rec==1) || ($rec==5) || ($rec==9) || ($rec==13) || ($rec==17)) 130 @if (($rec==1) || ($rec==5) || ($rec==9) || ($rec==13) || ($rec==17))
130 <div class="swiper-slide"> 131 <div class="swiper-slide">
131 <div class="employer__item"> 132 <div class="employer__item">
132 @endif 133 @endif
133 @if (!empty($emp->employer->logo)) 134 @if (!empty($emp->employer->logo))
134 <a href="{{ route('ad-employer', ['ad_employer' => $emp->employer->id]) }}"> 135 <a href="{{ route('ad-employer', ['ad_employer' => $emp->employer->id]) }}">
135 <img src="{{ asset(Storage::url($emp->employer->logo)) }}" alt="{{ $emp->employer->name_company }}"> 136 <img src="{{ asset(Storage::url($emp->employer->logo)) }}" alt="{{ $emp->employer->name_company }}">
136 </a> 137 </a>
137 @else 138 @else
138 <a href="{{ route('ad-employer', ['ad_employer' => $emp->employer->id]) }}"> 139 <a href="{{ route('ad-employer', ['ad_employer' => $emp->employer->id]) }}">
139 <img src="{{ asset('images/logo_emp.png') }}" alt="{{ $emp->employer->name_company }}"> 140 <img src="{{ asset('images/logo_emp.png') }}" alt="{{ $emp->employer->name_company }}">
140 </a> 141 </a>
141 @endif 142 @endif
142 @if (($rec==4) || ($rec==8) || ($rec==12) || ($rec==16) || ($rec==20) || ($rec == $count)) 143 @if (($rec==4) || ($rec==8) || ($rec==12) || ($rec==16) || ($rec==20) || ($rec == $count))
143 </div> 144 </div>
144 </div> 145 </div>
145 @endif 146 @endif
146 @endforeach 147 @endforeach
147 @else 148 @else
148 <h5>Тут нет никаких записей</h5> 149 <h5>Тут нет никаких записей</h5>
149 @endif 150 @endif
150 </div> 151 </div>
151 <div class="swiper-pagination"></div> 152 <div class="swiper-pagination"></div>
152 </div> 153 </div>
153 <a href="{{ route('shipping_companies') }}" class="employer__more button button_light">Все работодатели</a> 154 <a href="{{ route('shipping_companies') }}" class="employer__more button button_light">Все работодатели</a>
154 </div> 155 </div>
155 </section> 156 </section>
156 <section class="about"> 157 <section class="about">
157 <div class="container"> 158 <div class="container">
158 <div class="about__wrapper"> 159 <div class="about__wrapper">
159 <div class="title about__title"><h4>О нас</h4></div> 160 <div class="title about__title"><h4>О нас</h4></div>
160 <div class="about__body"> 161 <div class="about__body">
161 <div class="about__line"></div> 162 <div class="about__line"></div>
162 <div class="about__item"> 163 <div class="about__item">
163 <b>Для работодателей</b> 164 <b>Для работодателей</b>
164 <span>Наш ресурс позволит Вам за демократичную цену найти нужных специалистов в кратчайшие 165 <span>Наш ресурс позволит Вам за демократичную цену найти нужных специалистов в кратчайшие
165 сроки, подробнее об условиях можно узнать <a href="{{ route('page', ['pages' => 'Stoimost-razmescheniya']) }}">здесь</a>.</span> 166 сроки, подробнее об условиях можно узнать <a href="{{ route('page', ['pages' => 'Stoimost-razmescheniya']) }}">здесь</a>.</span>
166 <a class="about__button button button_whited" style="text-decoration: none" href="{{ route('bd_resume') }}">Поиск сотрудников</a> 167 <a class="about__button button button_whited" style="text-decoration: none" href="{{ route('bd_resume') }}">Поиск сотрудников</a>
167 </div> 168 </div>
168 <div class="about__item"> 169 <div class="about__item">
169 <b>Для сотрудников</b> 170 <b>Для сотрудников</b>
170 <span>Наше преимущество — это большой объем вакансий, более 70 судоходных компаний России и 171 <span>Наше преимущество — это большой объем вакансий, более 70 судоходных компаний России и
171 СНГ ищут сотрудников через наши ресурсы</span> 172 СНГ ищут сотрудников через наши ресурсы</span>
172 <a class="about__button button button_whited" style="text-decoration: none" href="{{ route('vacancies') }}">Ищу работу</a> 173 <a class="about__button button button_whited" style="text-decoration: none" href="{{ route('vacancies') }}">Ищу работу</a>
173 </div> 174 </div>
174 </div> 175 </div>
175 </div> 176 </div>
176 </div> 177 </div>
177 </section> 178 </section>
178 179
179 @if ($news->count()) 180 @if ($news->count())
180 <section class="news"> 181 <section class="news">
181 <div class="container"> 182 <div class="container">
182 <div class="news__toper"> 183 <div class="news__toper">
183 <div class="title"><h4>Новости и статьи</h4></div> 184 <div class="title"><h4>Новости и статьи</h4></div>
184 <div class="navs"> 185 <div class="navs">
185 <button class="js-news-swiper-button-prev"> 186 <button class="js-news-swiper-button-prev">
186 <svg class="rotate180"> 187 <svg class="rotate180">
187 <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use> 188 <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use>
188 </svg> 189 </svg>
189 </button> 190 </button>
190 <button class="js-news-swiper-button-next"> 191 <button class="js-news-swiper-button-next">
191 <svg> 192 <svg>
192 <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use> 193 <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use>
193 </svg> 194 </svg>
194 </button> 195 </button>
195 </div> 196 </div>
196 </div> 197 </div>
197 198
198 <div class="swiper js-news-swiper"> 199 <div class="swiper js-news-swiper">
199 <div class="swiper-wrapper"> 200 <div class="swiper-wrapper">
200 201
201 @foreach ($news as $new) 202 @foreach ($news as $new)
202 <div class="swiper-slide"> 203 <div class="swiper-slide">
203 <div class="news__item"> 204 <div class="news__item">
204 @if (empty($new->image)) 205 @if (empty($new->image))
205 <img src="{{ asset('/images/default_ship.jpg') }}" alt="" class="news__item-pic"> 206 <img src="{{ asset('/images/default_ship.jpg') }}" alt="" class="news__item-pic">
206 @else 207 @else
207 <img src="{{ asset(Storage::url($new->image)) }}" alt="" class="news__item-pic"> 208 <img src="{{ asset(Storage::url($new->image)) }}" alt="" class="news__item-pic">
208 @endif 209 @endif
209 <div class="news__item-body"> 210 <div class="news__item-body">
210 <time datetime="{{ date('d.m.Y H:i:s', strtotime($new->created_at)) }}" class="news__item-date">{{ date('d.m.Y H:i:s', strtotime($new->created_at)) }}</time> 211 <time datetime="{{ date('d.m.Y H:i:s', strtotime($new->created_at)) }}" class="news__item-date">{{ date('d.m.Y H:i:s', strtotime($new->created_at)) }}</time>
211 <span class="news__item-title">{{ $new->title }}</span> 212 <span class="news__item-title">{{ $new->title }}</span>
212 <span class="news__item-text">{!! mb_strimwidth($new->text, 0, 100) !!}</span> 213 <span class="news__item-text">{!! mb_strimwidth($new->text, 0, 100) !!}</span>
213 <a href="{{ route('detail_new', ['new' => $new->id]) }}" class="news__item-more button button_light">Читать далее</a> 214 <a href="{{ route('detail_new', ['new' => $new->id]) }}" class="news__item-more button button_light">Читать далее</a>
214 </div> 215 </div>
215 </div> 216 </div>
216 </div> 217 </div>
217 @endforeach 218 @endforeach
218 219
219 </div> 220 </div>
220 <div class="swiper-pagination"></div> 221 <div class="swiper-pagination"></div>
221 </div> 222 </div>
222 <a href="{{ route('news') }}" class="news__all button button_light">Все новости</a> 223 <a href="{{ route('news') }}" class="news__all button button_light">Все новости</a>
223 224
224 </div> 225 </div>
225 </section> 226 </section>
226 @endif 227 @endif
227 228
228 <section class="info"> 229 <section class="info">
229 <div class="container"> 230 <div class="container">
230 <img src="images/5.png" alt="" class="info__pic"> 231 <img src="images/5.png" alt="" class="info__pic">
231 <div class="info__body"> 232 <div class="info__body">
232 <div class="title info__title"><h4>Мы в социальных сетях</h4></div> 233 <div class="title info__title"><h4>Мы в социальных сетях</h4></div>
233 <div class="info__item"> 234 <div class="info__item">
234 <div class="info__text">Телеграм — Подпишитесь на наш телеграм канал и получайте уведомления о 235 <div class="info__text">Телеграм — Подпишитесь на наш телеграм канал и получайте уведомления о
235 новых вакансиях прямо на свой смартфон</div> 236 новых вакансиях прямо на свой смартфон</div>
236 <a href="{{ $companies[0]->telegram }}" class="info__link" style="background:#20A0E1"> 237 <a href="{{ $companies[0]->telegram }}" class="info__link" style="background:#20A0E1">
237 <svg> 238 <svg>
238 <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> 239 <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use>
239 </svg> 240 </svg>
240 Телеграм 241 Телеграм
241 </a> 242 </a>
242 </div> 243 </div>
243 <div class="info__item"> 244 <div class="info__item">
244 <div class="info__text">ВКонтакте — Лучшие вакансии за неделю выкладываем именно тут, информация 245 <div class="info__text">ВКонтакте — Лучшие вакансии за неделю выкладываем именно тут, информация
245 о судоходных компаниях, инструкции по работе с сайтом, конкурсы и многое другое</div> 246 о судоходных компаниях, инструкции по работе с сайтом, конкурсы и многое другое</div>
246 <a href="{{ $companies[0]->vkontact }}" class="info__link" style="background:#2787F5"> 247 <a href="{{ $companies[0]->vkontact }}" class="info__link" style="background:#2787F5">
247 <svg> 248 <svg>
248 <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> 249 <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use>
249 </svg> 250 </svg>
250 ВКонтакте 251 ВКонтакте
251 </a> 252 </a>
252 </div> 253 </div>
253 </div> 254 </div>
254 </div> 255 </div>
255 </section> 256 </section>
256 @endsection 257 @endsection
257 258
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
11 12 <link rel="stylesheet" href="{{ asset('css/telegram.css') }}">
12 <link rel="stylesheet" href="{{ asset('css/star-rating.min.css') }}"> 13
13 <link rel="stylesheet" href="{{ asset('css/style.css') }}"> 14 <link rel="stylesheet" href="{{ asset('css/star-rating.min.css') }}">
14 <style> 15 <link rel="stylesheet" href="{{ asset('css/style.css') }}">
15 .err_red { 16 <style>
16 border: red 2px solid; 17 .err_red {
17 } 18 border: red 2px solid;
18 </style> 19 }
19 </head> 20 </style>
20 21 </head>
21 <body id="body" onload="createCaptcha()"> 22
22 <a href="#body" class="to-top js-scroll-to"> 23 <body id="body" onload="createCaptcha()">
23 <svg> 24 <a href="#body" class="to-top js-scroll-to">
24 <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> 25 <svg>
25 </svg> 26 <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use>
26 </a> 27 </svg>
27 28 </a>
28 <div> <!-- BEGIN TOP WRAPPER --> 29
29 <header class="header"> 30 <div> <!-- BEGIN TOP WRAPPER -->
30 <div class="container"> 31 <header class="header">
31 <div class="header__body"> 32 <div class="container">
32 <div class="header__left"> 33 <div class="header__body">
33 <a href="{{ route('index') }}" class="header__logo"> 34 <div class="header__left">
34 <svg> 35 <a href="{{ route('index') }}" class="header__logo">
35 <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> 36 <svg>
36 </svg> 37 <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use>
37 </a> 38 </svg>
38 <nav class="header__menu"> 39 </a>
39 <a href="{{ route('vacancies') }}" class="header__menu-item">Вакансии</a> 40 <nav class="header__menu">
40 <a href="{{ route('shipping_companies') }}" class="header__menu-item">Судоходные компании</a> 41 <a href="{{ route('vacancies') }}" class="header__menu-item">Вакансии</a>
41 <a href="{{ route('education') }}" class="header__menu-item">Образование</a> 42 <a href="{{ route('shipping_companies') }}" class="header__menu-item">Судоходные компании</a>
42 </nav> 43 <a href="{{ route('education') }}" class="header__menu-item">Образование</a>
43 </div> 44 </nav>
44 <div class="header__right"> 45 </div>
45 @guest 46 <div class="header__right">
46 47 @guest
47 @else 48
48 <a href="@if ($UserId->is_worker) {{ route('worker.cabinet') }} @else {{ route('employer.cabinet') }} @endif" class="header__notifs header__notifs_actived"> 49 @else
49 <svg> 50 <a href="@if ($UserId->is_worker) {{ route('worker.cabinet') }} @else {{ route('employer.cabinet') }} @endif" class="header__notifs header__notifs_actived">
50 <use xlink:href="{{ asset('images/sprite.svg#ring') }}"></use> 51 <svg>
51 </svg> 52 <use xlink:href="{{ asset('images/sprite.svg#ring') }}"></use>
52 <span>Уведомления</span> 53 </svg>
53 </a> 54 <span>Уведомления</span>
54 55 </a>
55 @endguest 56
56 <div class="header__right-line"></div> 57 @endguest
57 <button class="header__burger"> 58 <div class="header__right-line"></div>
58 <svg> 59 <button class="header__burger">
59 <use xlink:href="{{ asset('images/sprite.svg#burger') }}"></use> 60 <svg>
60 </svg> 61 <use xlink:href="{{ asset('images/sprite.svg#burger') }}"></use>
61 </button> 62 </svg>
62 @guest 63 </button>
63 <a class="button header__sign" data-fancybox data-src="#sign" data-options='{"touch":false,"autoFocus":false}'>Войти</a> 64 @guest
64 @else 65 <a class="button header__sign" data-fancybox data-src="#sign" data-options='{"touch":false,"autoFocus":false}'>Войти</a>
65 <a class="button header__sign" href="{{ route('logout') }}">Выйти</a> 66 @else
66 @endguest 67 <a class="button header__sign" href="{{ route('logout') }}">Выйти</a>
67 </div> 68 @endguest
68 </div> 69 </div>
69 </div> 70 </div>
70 </header> 71 </div>
71 72 </header>
72 @yield('content') 73
73 </div> <!-- END TOP WRAPPER --> 74 @yield('content')
74 75 </div> <!-- END TOP WRAPPER -->
75 <div> <!-- BEGIN BOTTOM WRAPPER --> 76
76 <footer class="footer"> 77 <div> <!-- BEGIN BOTTOM WRAPPER -->
77 <div class="container"> 78 <footer class="footer">
78 <div class="footer__mobile"> 79 <div class="container">
79 80 <div class="footer__mobile">
80 <button class="footer__mobile-toper js-toggle active"> 81
81 <a href="{{ route('index') }}"> 82 <button class="footer__mobile-toper js-toggle active">
82 <svg> 83 <a href="{{ route('index') }}">
83 <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> 84 <svg>
84 </svg> 85 <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use>
85 </a> 86 </svg>
86 <span> 87 </a>
87 <svg> 88 <span>
88 <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> 89 <svg>
89 </svg> 90 <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use>
90 </span> 91 </svg>
91 </button> 92 </span>
92 <div class="footer__mobile-menu"> 93 </button>
93 <div class="footer__mobile-menu-item"> 94 <div class="footer__mobile-menu">
94 <button class="js-toggle"> 95 <div class="footer__mobile-menu-item">
95 <b>Соискателям</b> 96 <button class="js-toggle">
96 <span><svg> 97 <b>Соискателям</b>
97 <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use> 98 <span><svg>
98 </svg></span> 99 <use xlink:href="{{ asset('images/sprite.svg#arrow-top') }}"></use>
99 </button> 100 </svg></span>
100 <div> 101 </button>
101 <a href="{{ route('vacancies') }}">Вакансии</a> 102 <div>
102 <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a> 103 <a href="{{ route('vacancies') }}">Вакансии</a>
103 <a href="{{ route('education') }}">Образование</a> 104 <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a>
104 <a href="{{ route('news') }}">Новости</a> 105 <a href="{{ route('education') }}">Образование</a>
105 <a href="{{ route('contacts') }}">Контакты</a> 106 <a href="{{ route('news') }}">Новости</a>
106 <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a> 107 <a href="{{ route('contacts') }}">Контакты</a>
107 </div> 108 <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a>
108 </div> 109 </div>
109 <div class="footer__mobile-menu-item"> 110 </div>
110 <button class="js-toggle"> 111 <div class="footer__mobile-menu-item">
111 <b>Работодателям</b> 112 <button class="js-toggle">
112 <span><svg> 113 <b>Работодателям</b>
113 <use xlink:href="{{asset('images/sprite.svg#arrow-top') }}"></use> 114 <span><svg>
114 </svg></span> 115 <use xlink:href="{{asset('images/sprite.svg#arrow-top') }}"></use>
115 </button> 116 </svg></span>
116 <div> 117 </button>
117 <a href="{{ route('register') }}">Регистрация</a> 118 <div>
118 <a href="{{ route('bd_resume') }}">База резюме</a> 119 <a href="{{ route('register') }}">Регистрация</a>
119 <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a> 120 <a href="{{ route('bd_resume') }}">База резюме</a>
120 <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a> 121 <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a>
121 <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a> 122 <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a>
122 <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a> 123 <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a>
123 </div> 124 <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a>
124 </div> 125 </div>
125 </div> 126 </div>
126 <div class="footer__mobile-contacts"> 127 </div>
127 <b>Контакты</b> 128 <div class="footer__mobile-contacts">
128 <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a> 129 <b>Контакты</b>
129 <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a> 130 <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a>
130 </div> 131 <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a>
131 <div class="footer__mobile-bottom"> 132 </div>
132 <div class="socials"> 133 <div class="footer__mobile-bottom">
133 <a href="{{ $companies[0]->vkontact }}" target="_blank"> 134 <div class="socials">
134 <svg> 135 <a href="{{ $companies[0]->vkontact }}" target="_blank">
135 <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> 136 <svg>
136 </svg> 137 <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use>
137 </a> 138 </svg>
138 <a href="{{ $companies[0]->telegram }}" target="_blank"> 139 </a>
139 <svg> 140 <a href="{{ $companies[0]->telegram }}" target="_blank">
140 <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> 141 <svg>
141 </svg> 142 <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use>
142 </a> 143 </svg>
143 </div> 144 </a>
144 <nav class="footer__mobile-links"> 145 </div>
145 <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a> 146 <nav class="footer__mobile-links">
146 <span></span> 147 <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a>
147 <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a> 148 <span></span>
148 </nav> 149 <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a>
149 &copy; 2023 &mdash; RekaMore.su 150 </nav>
150 <a href="{{ route('index') }}" class="nls" target="_blank"> 151 &copy; 2023 &mdash; RekaMore.su
151 <svg> 152 <a href="{{ route('index') }}" class="nls" target="_blank">
152 <use xlink:href="{{ asset('images/sprite.svg#nls') }}"></use> 153 <svg>
153 </svg> 154 <use xlink:href="{{ asset('images/sprite.svg#nls') }}"></use>
154 <span> 155 </svg>
155 Дизайн и разработка: 156 <span>
156 <b>NoLogoStudio.ru</b> 157 Дизайн и разработка:
157 </span> 158 <b>NoLogoStudio.ru</b>
158 </a> 159 </span>
159 </div> 160 </a>
160 </div> 161 </div>
161 <div class="footer__main"> 162 </div>
162 <div class="footer__main-body"> 163 <div class="footer__main">
163 164 <div class="footer__main-body">
164 <a href="" class="footer__main-logo"> 165
165 <svg> 166 <a href="" class="footer__main-logo">
166 <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use> 167 <svg>
167 </svg> 168 <use xlink:href="{{ asset('images/sprite.svg#logo') }}"></use>
168 </a> 169 </svg>
169 <div class="footer__main-col"> 170 </a>
170 <div class="footer__main-title">Соискателям</div> 171 <div class="footer__main-col">
171 <nav> 172 <div class="footer__main-title">Соискателям</div>
172 <a href="{{ route('vacancies') }}">Вакансии</a> 173 <nav>
173 <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a> 174 <a href="{{ route('vacancies') }}">Вакансии</a>
174 <a href="{{ route('education') }}">Образование</a> 175 <a href="{{ route('page', ['pages' => "Usloviya-razmescheniya"]) }}">Условия размещения</a>
175 <a href="{{ route('news') }}">Новости</a> 176 <a href="{{ route('education') }}">Образование</a>
176 <a href="{{ route('contacts') }}">Контакты</a> 177 <a href="{{ route('news') }}">Новости</a>
177 <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a> 178 <a href="{{ route('contacts') }}">Контакты</a>
178 </nav> 179 <a href="{{ route('page', ['pages' => "Publichnaya-oferta-soiskatelyam"]) }}">Публичная оферта</a>
179 </div> 180 </nav>
180 <div class="footer__main-col"> 181 </div>
181 <div class="footer__main-title">Работодателям</div> 182 <div class="footer__main-col">
182 <nav> 183 <div class="footer__main-title">Работодателям</div>
183 <a href="{{ route('register') }}">Регистрация</a> 184 <nav>
184 <a href="{{ route('bd_resume') }}">База резюме</a> 185 <a href="{{ route('register') }}">Регистрация</a>
185 <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a> 186 <a href="{{ route('bd_resume') }}">База резюме</a>
186 <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a> 187 <a href="{{ route('page', ['pages' => "Stoimost-razmescheniya"]) }}">Стоимость размещения</a>
187 <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a> 188 <a href="{{ route('page', ['pages' => "Instrukcii"]) }}">Инструкции</a>
188 <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a> 189 <a href="{{ route('page', ['pages' => "Effektivnost-obyavleniya"]) }}">Эффективность объявления</a>
189 </nav> 190 <a href="{{ route('page', ['pages' => "Publichnaya-oferta-rabotodatelyam"]) }}">Публичная оферта</a>
190 </div> 191 </nav>
191 192 </div>
192 <div class="footer__main-col"> 193
193 <div class="footer__main-title">Контакты</div> 194 <div class="footer__main-col">
194 <div class="footer__main-contacts"> 195 <div class="footer__main-title">Контакты</div>
195 <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a> 196 <div class="footer__main-contacts">
196 <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a> 197 <a href="tel:{{ $companies[0]->telephone }}">{{ $companies[0]->telephone }}</a>
197 </div> 198 <a href="mailto:{{ $companies[0]->email }}">{{ $companies[0]->email }}</a>
198 <div class="socials"> 199 </div>
199 <a href="{{ $companies[0]->vkontact }}" target="_blank"> 200 <div class="socials">
200 <svg> 201 <a href="{{ $companies[0]->vkontact }}" target="_blank">
201 <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> 202 <svg>
202 </svg> 203 <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use>
203 </a> 204 </svg>
204 <a href="{{ $companies[0]->telegram }}" target="_blank"> 205 </a>
205 <svg> 206 <a href="{{ $companies[0]->telegram }}" target="_blank">
206 <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> 207 <svg>
207 </svg> 208 <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use>
208 </a> 209 </svg>
209 </div> 210 </a>
210 </div> 211 </div>
211 </div> 212 </div>
212 213 </div>
213 <div class="footer__main-copy"> 214
214 <div>&copy; 2023 &mdash; RekaMore.su</div> 215 <div class="footer__main-copy">
215 <nav> 216 <div>&copy; 2023 &mdash; RekaMore.su</div>
216 <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a> 217 <nav>
217 <span></span> 218 <a href="{{ route('page', ['pages' => "Politika-konfidencialnosti"]) }}">Политика конфиденциальности</a>
218 <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a> 219 <span></span>
219 </nav> 220 <a href="{{ route('page', ['pages' => "Polzovatelskoe-soglashenie"]) }}">Пользовательское соглашение</a>
220 <div> @if (isset($_COOKIE['favorite_vacancy'])) Куки вакансий: {{ print_r($_COOKIE['favorite_vacancy']) }} @endif</div> 221 </nav>
221 <a href="{{ route('index') }}" class="nls" target="_blank"> 222 <div> @if (isset($_COOKIE['favorite_vacancy'])) Куки вакансий: {{ print_r($_COOKIE['favorite_vacancy']) }} @endif</div>
222 <svg> 223 <a href="{{ route('index') }}" class="nls" target="_blank">
223 <use xlink:href="{{ asset('images/sprite.svg#nls') }}"></use> 224 <svg>
224 </svg> 225 <use xlink:href="{{ asset('images/sprite.svg#nls') }}"></use>
225 <span> 226 </svg>
226 Дизайн и разработка: 227 <span>
227 <b>NoLogoStudio.ru</b> 228 Дизайн и разработка:
228 </span> 229 <b>NoLogoStudio.ru</b>
229 </a> 230 </span>
230 </div> 231 </a>
231 </div> 232 </div>
232 </div> 233 </div>
233 </footer> 234 </div>
234 </div> <!-- END BOTTOM WRAPPER --> 235 </footer>
235 236 </div> <!-- END BOTTOM WRAPPER -->
236 <div hidden> <!-- BEGIN MODALS WRAPPER --> 237
237 <!-- Соискатель отправляет сообщение работодателю --> 238 <div hidden> <!-- BEGIN MODALS WRAPPER -->
238 @include('modals.send_worker_new') 239 <!-- Соискатель отправляет сообщение работодателю -->
239 240 @include('modals.send_worker_new')
240 <!-- Работодатель отправляет сообщение соискателю --> 241
241 @include('modals.send_employer') 242 <!-- Работодатель отправляет сообщение соискателю -->
242 243 @include('modals.send_employer')
243 <!-- Сообщение-предупреждение о том, что сообщения только можно отправить авторизованным пользователям --> 244
244 @include('modals.send_message_noaut') 245 <!-- Сообщение-предупреждение о том, что сообщения только можно отправить авторизованным пользователям -->
245 246 @include('modals.send_message_noaut')
246 @include('modals.send_message_noaut2') 247
247 248 @include('modals.send_message_noaut2')
248 <!-- Форма авторизации --> 249
249 @include('modals.send_login') 250 <!-- Форма авторизации -->
250 251 @include('modals.send_login')
251 <!-- Сбросить пароль --> 252
252 @include('modals.reset_password') 253 <!-- Сбросить пароль -->
253 254 @include('modals.reset_password')
254 <!-- Регистрация --> 255
255 @include('modals.register') 256 <!-- Регистрация -->
256 257 @include('modals.register')
257 <!-- Благодарность по отправке сообщения работодателю --> 258
258 @include('modals.thank_you_send_employer') 259 <!-- Благодарность по отправке сообщения работодателю -->
259 260 @include('modals.thank_you_send_employer')
260 <!-- Благодарность по отправке сообщения менеджеру --> 261
261 @include('modals.thank_you_send_manager') 262 <!-- Благодарность по отправке сообщения менеджеру -->
262 263 @include('modals.thank_you_send_manager')
263 <!-- Благодарность после регистрации --> 264
264 @include('modals.thank_you_send_for_employer') 265 <!-- Благодарность после регистрации -->
265 266 @include('modals.thank_you_send_for_employer')
266 <!-- Благодарность после регистрации для работника --> 267
267 @include('modals.thank_you_send_for_worker') 268 <!-- Благодарность после регистрации для работника -->
268 269 @include('modals.thank_you_send_for_worker')
269 <!-- Подтверждение удаления профиля --> 270
270 @include('modals.delete_profile') 271 <!-- Подтверждение удаления профиля -->
271 272 @include('modals.delete_profile')
272 <!-- Подверждение об удалении профиля --> 273
273 @include('modals.success_delete_profile') 274 <!-- Подверждение об удалении профиля -->
274 275 @include('modals.success_delete_profile')
275 </div> <!-- END MODALS WRAPPER --> 276
276 277 </div> <!-- END MODALS WRAPPER -->
277 278
278 <script src="{{ asset('js/jquery.maskedinput.js') }}"></script> 279
279 <script src="{{ asset('js/jquery.fancybox.js') }}"></script> 280 <script src="{{ asset('js/jquery.maskedinput.js') }}"></script>
280 <script src="{{ asset('js/jquery.select2.js') }}"></script> 281 <script src="{{ asset('js/jquery.fancybox.js') }}"></script>
281 <script src="{{ asset('js/swiper.js') }}"></script> 282 <script src="{{ asset('js/jquery.select2.js') }}"></script>
282 <script src="{{ asset('js/script-vc.js') }}"></script> 283 <script src="{{ asset('js/swiper.js') }}"></script>
283 <script src="{{ asset('js/star-rating.min.js') }}"></script> 284 <script src="{{ asset('js/script-vc.js') }}"></script>
284 <script> 285 <script src="{{ asset('js/star-rating.min.js') }}"></script>
285 var getUrlParameter = function getUrlParameter(sParam) { 286 <script>
286 var sPageURL = decodeURIComponent(window.location.search.substring(1)), 287 var getUrlParameter = function getUrlParameter(sParam) {
287 sURLVariables = sPageURL.split('&'), 288 var sPageURL = decodeURIComponent(window.location.search.substring(1)),
288 sParameterName, 289 sURLVariables = sPageURL.split('&'),
289 i; 290 sParameterName,
290 for (i = 0; i < sURLVariables.length; i++) { 291 i;
291 sParameterName = sURLVariables[i].split('='); 292 for (i = 0; i < sURLVariables.length; i++) {
292 if (sParameterName[0] === sParam) { 293 sParameterName = sURLVariables[i].split('=');
293 return sParameterName[1] === undefined ? true : sParameterName[1]; 294 if (sParameterName[0] === sParam) {
294 } 295 return sParameterName[1] === undefined ? true : sParameterName[1];
295 } 296 }
296 }; 297 }
297 </script> 298 };
298 @include('js.modals') 299 </script>
299 @include('js.captha') 300 @include('js.modals')
300 @yield('scripts') 301 @include('js.captha')
301 </body> 302 @yield('scripts')
302 </html> 303 </body>
303 304 </html>
305
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
resources/views/resume.blade.php
1 @extends('layout.frontend', ['title' => 'База резюме - РекаМоре']) 1 @extends('layout.frontend', ['title' => 'База резюме - РекаМоре'])
2 2
3 @section('scripts') 3 @section('scripts')
4 <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script> 4 <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
5 <script> 5 <script>
6 console.log('Test system'); 6 console.log('Test system');
7 $(document).on('change', '#jobs', function() { 7 $(document).on('change', '#jobs', function() {
8 var val = $(this).val(); 8 var val = $(this).val();
9 var main_oskar = $('#main_ockar'); 9 var main_oskar = $('#main_ockar');
10 10
11 console.log('Code='+val); 11 console.log('Code='+val);
12 console.log('Click change...'); 12 console.log('Click change...');
13 $.ajax({ 13 $.ajax({
14 type: "GET", 14 type: "GET",
15 url: "", 15 url: "",
16 data: "job="+val, 16 data: "job="+val,
17 success: function (data) { 17 success: function (data) {
18 console.log('Выбор сделан!'); 18 console.log('Выбор сделан!');
19 console.log(data); 19 console.log(data);
20 main_oskar.html(data); 20 main_oskar.html(data);
21 }, 21 },
22 headers: { 22 headers: {
23 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 23 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
24 }, 24 },
25 error: function (data) { 25 error: function (data) {
26 data = JSON.stringify(data); 26 data = JSON.stringify(data);
27 console.log('Error: ' + data); 27 console.log('Error: ' + data);
28 } 28 }
29 }); 29 });
30 }); 30 });
31 </script> 31 </script>
32 32
33 <script> 33 <script>
34 $(document).ready(function() { 34 $(document).ready(function() {
35 $(document).on('click', '.js_box_favorites', function () { 35 $(document).on('click', '.js_box_favorites', function () {
36 var _this = $(this); 36 var _this = $(this);
37 var id_worker = _this.attr('data-val'); 37 var id_worker = _this.attr('data-val');
38 38
39 if (_this.hasClass('active')) { 39 if (_this.hasClass('active')) {
40 add_in_array(id_worker); 40 add_in_array(id_worker);
41 console.log('Добавлено в избранное id=' + id_worker); 41 console.log('Добавлено в избранное id=' + id_worker);
42 } else { 42 } else {
43 delete_in_array(id_worker); 43 delete_in_array(id_worker);
44 console.log('Удалено из избранных id='+id_worker) 44 console.log('Удалено из избранных id='+id_worker)
45 } 45 }
46 var str = $.cookie('favorite_worker'); 46 var str = $.cookie('favorite_worker');
47 console.log("Вывод куков "+str); 47 console.log("Вывод куков "+str);
48 48
49 }); 49 });
50 }); 50 });
51 51
52 //помеченный элемент 52 //помеченный элемент
53 function selected_item(obj) { 53 function selected_item(obj) {
54 var arr = read_array(); 54 var arr = read_array();
55 var index = arr.indexOf(obj); 55 var index = arr.indexOf(obj);
56 56
57 if (index > 0) 57 if (index > 0)
58 return "active"; 58 return "active";
59 else 59 else
60 return ""; 60 return "";
61 } 61 }
62 62
63 // запись элемента массива в cookie 63 // запись элемента массива в cookie
64 function add_in_array(obj){ 64 function add_in_array(obj){
65 var arr = read_array();//получаем текущее состояние массива 65 var arr = read_array();//получаем текущее состояние массива
66 arr[arr.length]=obj; //добавляем элемент в конец 66 arr[arr.length]=obj; //добавляем элемент в конец
67 //var str = JSON.stringify(arr);//конвертируем в строку 67 //var str = JSON.stringify(arr);//конвертируем в строку
68 //$.cookie('arr',str);//записываем массив в куки 68 //$.cookie('arr',str);//записываем массив в куки
69 $.cookie('favorite_worker', JSON.stringify(arr)); 69 $.cookie('favorite_worker', JSON.stringify(arr));
70 70
71 } 71 }
72 72
73 // удаление элемента из массива в cookie 73 // удаление элемента из массива в cookie
74 function delete_in_array(obj) { 74 function delete_in_array(obj) {
75 var arr = read_array(); 75 var arr = read_array();
76 var unique = [...new Set(arr)] 76 var unique = [...new Set(arr)]
77 var index = unique.indexOf(obj); 77 var index = unique.indexOf(obj);
78 78
79 unique.splice(index, 1); 79 unique.splice(index, 1);
80 80
81 //var str = JSON.stringify(arr);//конвертируем в строку 81 //var str = JSON.stringify(arr);//конвертируем в строку
82 //$.cookie('arr',str);//записываем массив в куки 82 //$.cookie('arr',str);//записываем массив в куки
83 $.cookie('favorite_worker', JSON.stringify(unique)); 83 $.cookie('favorite_worker', JSON.stringify(unique));
84 84
85 } 85 }
86 86
87 function read_array(){ 87 function read_array(){
88 var dataArr=$.cookie('favorite_worker');//считываем данные из куков 88 var dataArr=$.cookie('favorite_worker');//считываем данные из куков
89 89
90 //если массив не был обнаружен, иницилизируем его 90 //если массив не был обнаружен, иницилизируем его
91 if(dataArr===null){ 91 if(dataArr===null){
92 dataArr = init_array(); //возвращаем инициализированный пустой маасив 92 dataArr = init_array(); //возвращаем инициализированный пустой маасив
93 } 93 }
94 //возвращаем полученный массив 94 //возвращаем полученный массив
95 //return JSON.parse(dataArr); 95 //return JSON.parse(dataArr);
96 return JSON.parse(dataArr); 96 return JSON.parse(dataArr);
97 } 97 }
98 98
99 //другими словами создаем пустой массив 99 //другими словами создаем пустой массив
100 function init_array(){ 100 function init_array(){
101 //var str = JSON.stringify(new Array());//конвертируем в строку 101 //var str = JSON.stringify(new Array());//конвертируем в строку
102 var str = JSON.stringify(new Array()); 102 var str = JSON.stringify(new Array());
103 $.cookie('favorite_worker',str);//записываем массив в куки 103 $.cookie('favorite_worker',str);//записываем массив в куки
104 104
105 return str; 105 return str;
106 } 106 }
107 </script> 107 </script>
108 <script> 108 <script>
109 $(document).on('click', '.js_it_button', function() { 109 $(document).on('click', '.js_it_button', function() {
110 var this_ = $(this); 110 var this_ = $(this);
111 var code_user_id = this_.attr('data-uid'); 111 var code_user_id = this_.attr('data-uid');
112 var code_to_user_id = this_.attr('data-tuid'); 112 var code_to_user_id = this_.attr('data-tuid');
113 var code_vacancy = this_.attr('data-vacancy'); 113 var code_vacancy = this_.attr('data-vacancy');
114 var user_id = $('#_user_id'); 114 var user_id = $('#_user_id');
115 var to_user_id = $('#_to_user_id'); 115 var to_user_id = $('#_to_user_id');
116 var vacancy = $('#_vacancy'); 116 var vacancy = $('#_vacancy');
117 117
118 console.log('code_to_user_id='+code_to_user_id); 118 console.log('code_to_user_id='+code_to_user_id);
119 console.log('code_user_id='+code_user_id); 119 console.log('code_user_id='+code_user_id);
120 console.log('code_vacancy='+code_vacancy); 120 console.log('code_vacancy='+code_vacancy);
121 console.log('Клик на кнопке...'); 121 console.log('Клик на кнопке...');
122 122
123 user_id.val(code_user_id); 123 user_id.val(code_user_id);
124 to_user_id.val(code_to_user_id); 124 to_user_id.val(code_to_user_id);
125 vacancy.val(code_vacancy); 125 vacancy.val(code_vacancy);
126 }); 126 });
127 </script> 127 </script>
128 <script> 128 <script>
129 $(document).on('change', '#sort_ajax', function() { 129 $(document).on('change', '#sort_ajax', function() {
130 var this_ = $(this); 130 var this_ = $(this);
131 var val_ = this_.val(); 131 var val_ = this_.val();
132 console.log('sort items '+val_); 132 console.log('sort items '+val_);
133 133
134 $.ajax({ 134 $.ajax({
135 type: "GET", 135 type: "GET",
136 url: "{{ route('bd_resume') }}", 136 url: "{{ route('bd_resume') }}",
137 data: "sort="+val_+"&block=1", 137 data: "sort="+val_+"&block=1",
138 success: function (data) { 138 success: function (data) {
139 console.log('Выбор сортировки'); 139 console.log('Выбор сортировки');
140 console.log(data); 140 console.log(data);
141 $('#block1').html(data); 141 $('#block1').html(data);
142 history.pushState({}, '', "{{ route('bd_resume') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); 142 history.pushState({}, '', "{{ route('bd_resume') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif");
143 }, 143 },
144 headers: { 144 headers: {
145 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 145 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
146 }, 146 },
147 error: function (data) { 147 error: function (data) {
148 data = JSON.stringify(data); 148 data = JSON.stringify(data);
149 console.log('Error: ' + data); 149 console.log('Error: ' + data);
150 } 150 }
151 }); 151 });
152 152
153 $.ajax({ 153 $.ajax({
154 type: "GET", 154 type: "GET",
155 url: "{{ route('bd_resume') }}", 155 url: "{{ route('bd_resume') }}",
156 data: "sort="+val_+"&block=2", 156 data: "sort="+val_+"&block=2",
157 success: function (data) { 157 success: function (data) {
158 console.log('Выбор сортировки'); 158 console.log('Выбор сортировки');
159 console.log(data); 159 console.log(data);
160 $('#block2').html(data); 160 $('#block2').html(data);
161 history.pushState({}, '', "{{ route('bd_resume') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); 161 history.pushState({}, '', "{{ route('bd_resume') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif");
162 }, 162 },
163 headers: { 163 headers: {
164 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 164 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
165 }, 165 },
166 error: function (data) { 166 error: function (data) {
167 data = JSON.stringify(data); 167 data = JSON.stringify(data);
168 console.log('Error: ' + data); 168 console.log('Error: ' + data);
169 } 169 }
170 }); 170 });
171 171
172 }); 172 });
173 173
174 $(document).ready(function(){ 174 $(document).ready(function(){
175 var sel = $('#select2-sort_ajax-container'); 175 var sel = $('#select2-sort_ajax-container');
176 var key = getUrlParameter('sort'); 176 var key = getUrlParameter('sort');
177 console.log(sel); 177 console.log(sel);
178 console.log(key); 178 console.log(key);
179 179
180 if (key !=='') { 180 if (key !=='') {
181 console.log(key); 181 console.log(key);
182 switch (key) { 182 switch (key) {
183 case "default": sel.html('Сортировка (по умолчанию)'); break; 183 case "default": sel.html('Сортировка (по умолчанию)'); break;
184 case "name_up": sel.html('По имени (возрастание)'); break; 184 case "name_up": sel.html('По имени (возрастание)'); break;
185 case "name_down": sel.html('По дате (убывание)'); break; 185 case "name_down": sel.html('По дате (убывание)'); break;
186 case "created_at_up": sel.html('По дате (возрастание)'); break; 186 case "created_at_up": sel.html('По дате (возрастание)'); break;
187 case "created_at_down": sel.html('По дате (убывание)'); break; 187 case "created_at_down": sel.html('По дате (убывание)'); break;
188 } 188 }
189 189
190 } 190 }
191 }); 191 });
192 </script> 192 </script>
193 193
194 <script> 194 <script>
195 console.log('Test system'); 195 console.log('Test system');
196 $(document).on('change', '.jobs', function() { 196 $(document).on('change', '.jobs', function() {
197 var val = $(this).val(); 197 var val = $(this).val();
198 198
199 console.log('Click filter вакансии...'); 199 console.log('Click filter вакансии...');
200 $.ajax({ 200 $.ajax({
201 type: "GET", 201 type: "GET",
202 url: "{{ route('bd_resume') }}", 202 url: "{{ route('bd_resume') }}",
203 data: "job="+val+'&block=1', 203 data: "job="+val+'&block=1',
204 success: function (data) { 204 success: function (data) {
205 console.log('Выбор должности'); 205 console.log('Выбор должности');
206 console.log(data); 206 console.log(data);
207 $('#block1').html(data); 207 $('#block1').html(data);
208 history.pushState({}, '', "{{ route('bd_resume') }}?job="+val+"@if (isset($_GET['sort']))&sort={{ $_GET['sort'] }}@endif"+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); 208 history.pushState({}, '', "{{ route('bd_resume') }}?job="+val+"@if (isset($_GET['sort']))&sort={{ $_GET['sort'] }}@endif"+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif");
209 }, 209 },
210 headers: { 210 headers: {
211 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 211 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
212 }, 212 },
213 error: function (data) { 213 error: function (data) {
214 data = JSON.stringify(data); 214 data = JSON.stringify(data);
215 console.log('Error: ' + data); 215 console.log('Error: ' + data);
216 } 216 }
217 }); 217 });
218 218
219 $.ajax({ 219 $.ajax({
220 type: "GET", 220 type: "GET",
221 url: "{{ route('bd_resume') }}", 221 url: "{{ route('bd_resume') }}",
222 data: "job="+val+'&block=2', 222 data: "job="+val+'&block=2',
223 success: function (data) { 223 success: function (data) {
224 console.log('Выбор должности'); 224 console.log('Выбор должности');
225 console.log(data); 225 console.log(data);
226 $('#block2').html(data); 226 $('#block2').html(data);
227 }, 227 },
228 headers: { 228 headers: {
229 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 229 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
230 }, 230 },
231 error: function (data) { 231 error: function (data) {
232 data = JSON.stringify(data); 232 data = JSON.stringify(data);
233 console.log('Error: ' + data); 233 console.log('Error: ' + data);
234 } 234 }
235 }); 235 });
236 }); 236 });
237 </script> 237 </script>
238 @include('js.favorite-worker') 238 @include('js.favorite-worker')
239 @endsection 239 @endsection
240 240
241 241
242 @section('content') 242 @section('content')
243 <section class="thing"> 243 <section class="thing">
244 <div class="container"> 244 <div class="container">
245 <form class="thing__body" action="{{ url()->current() }}"> 245 <form class="thing__body" action="{{ url()->current() }}">
246 <ul class="breadcrumbs thing__breadcrumbs"> 246 <ul class="breadcrumbs thing__breadcrumbs">
247 <li><a href="{{ route('index') }}">Главная</a></li> 247 <li><a href="{{ route('index') }}">Главная</a></li>
248 <li><b>База резюме</b></li> 248 <li><b>База резюме</b></li>
249 </ul> 249 </ul>
250 <h1 class="thing__title">База резюме</h1> 250 <h1 class="thing__title">База резюме</h1>
251 <p class="thing__text">С другой стороны, социально-экономическое развитие не оставляет шанса для 251 <p class="thing__text">С другой стороны, социально-экономическое развитие не оставляет шанса для
252 существующих финансовых и административных условий.</p> 252 существующих финансовых и административных условий.</p>
253 <!--<div class="search thing__search"> 253 <!--<div class="search thing__search">
254 <input type="search" class="input" name="search" id="search" placeholder="Введите наименование должности" required> 254 <input type="search" class="input" name="search" id="search" placeholder="Введите наименование должности" required>
255 <button type="submit" class="button">Найти</button> 255 <button type="submit" class="button">Найти</button>
256 <span> 256 <span>
257 <svg> 257 <svg>
258 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> 258 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use>
259 </svg> 259 </svg>
260 </span> 260 </span>
261 </div>--> 261 </div>-->
262 262
263 <div class="select select_search thing__select"> 263 <div class="select select_search thing__select">
264 <div class="select__icon"> 264 <div class="select__icon">
265 <svg> 265 <svg>
266 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> 266 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use>
267 </svg> 267 </svg>
268 </div> 268 </div>
269 <select class="js-select2 jobs" name="search" id="search"> 269 <select class="js-select2 jobs" name="search" id="search">
270 <option value="0">Выберите должность</option> 270 <option value="0">Выберите должность</option>
271 @if($Job_title->count()) 271 @if($Job_title->count())
272 @foreach($Job_title as $JT) 272 @foreach($Job_title as $JT)
273 <option value="{{ $JT->id }}" @if (isset($_GET['job'])) @if($_GET['job'] == $JT->id) selected @endif @endif>{{ $JT->name }}</option> 273 <option value="{{ $JT->id }}" @if (isset($_GET['job'])) @if($_GET['job'] == $JT->id) selected @endif @endif>{{ $JT->name }}</option>
274 @endforeach 274 @endforeach
275 @endif 275 @endif
276 </select> 276 </select>
277 </div> 277 </div>
278 278
279 <!--<label class="checkbox thing__checkbox"> 279 <!--<label class="checkbox thing__checkbox">
280 <input type="checkbox" class="checkbox__input" name="experience" id="experience"> 280 <input type="checkbox" class="checkbox__input" name="experience" id="experience">
281 <span class="checkbox__icon"> 281 <span class="checkbox__icon">
282 <svg> 282 <svg>
283 <use xlink:href=" asset('images/sprite.svg#v') }}"></use> 283 <use xlink:href=" asset('images/sprite.svg#v') }}"></use>
284 </svg> 284 </svg>
285 </span> 285 </span>
286 <span class="checkbox__text"> 286 <span class="checkbox__text">
287 <span> 287 <span>
288 Опыт работы 288 Опыт работы
289 </span> 289 </span>
290 </span> 290 </span>
291 </label>--> 291 </label>-->
292 </form> 292 </form>
293 </div> 293 </div>
294 </section> 294 </section>
295 <main class="main"> 295 <main class="main">
296 <div class="container"> 296 <div class="container">
297 <div class="main__resume-base"> 297 <div class="main__resume-base">
298 <h2>Резюме работников</h2> 298 <h2>Резюме работников</h2>
299 <div class="filters"> 299 <div class="filters">
300 <div class="filters__label">Показано {{ $resumes->firstItem() }} – {{ $resumes->lastItem() }} из {{ $res_count }} результатов поиска</div> 300 <div class="filters__label">Показано {{ $resumes->firstItem() }} – {{ $resumes->lastItem() }} из {{ $res_count }} результатов поиска</div>
301 <div class="filters__body"> 301 <div class="filters__body">
302 <div class="select filters__select"> 302 <div class="select filters__select">
303 <select class="js-select2" id="sort_ajax" name="sort_ajax"> 303 <select class="js-select2" id="sort_ajax" name="sort_ajax">
304 <option value="default">Сортировка (по умолчанию)</option> 304 <option value="default">Сортировка (по умолчанию)</option>
305 <option value="name_up">По имени (возрастание)</option> 305 <option value="name_up">По имени (возрастание)</option>
306 <option value="name_down">По имени (убывание)</option> 306 <option value="name_down">По имени (убывание)</option>
307 <option value="created_at_up">По дате (возрастание)</option> 307 <option value="created_at_up">По дате (возрастание)</option>
308 <option value="created_at_down">По дате (убывание)</option> 308 <option value="created_at_down">По дате (убывание)</option>
309 </select> 309 </select>
310 </div> 310 </div>
311 <button type="button" class="filters__item active" data-tab="1"> 311 <button type="button" class="filters__item active" data-tab="1">
312 <svg> 312 <svg>
313 <use xlink:href="{{ asset('images/sprite.svg#grid-1') }}"></use> 313 <use xlink:href="{{ asset('images/sprite.svg#grid-1') }}"></use>
314 </svg> 314 </svg>
315 </button> 315 </button>
316 <button type="button" class="filters__item" data-tab="2"> 316 <button type="button" class="filters__item" data-tab="2">
317 <svg> 317 <svg>
318 <use xlink:href="{{ asset('images/sprite.svg#grid-2') }}"></use> 318 <use xlink:href="{{ asset('images/sprite.svg#grid-2') }}"></use>
319 </svg> 319 </svg>
320 </button> 320 </button>
321 </div> 321 </div>
322 </div> 322 </div>
323 <div class="main__resume-base-body showed" data-body="1"> 323 <div class="main__resume-base-body showed" data-body="1">
324 <div class="main__resume-base-body-one" id="block1" name="block1"> 324 <div class="main__resume-base-body-one" id="block1" name="block1">
325 @if ($resumes->count()) 325 @if ($resumes->count())
326 @foreach ($resumes as $res) 326 @foreach ($resumes as $res)
327 <div class="main__resume-base-body-item"> 327 <div class="main__resume-base-body-item">
328 <div class="main__resume-base-body-item-buttons"> 328 <div class="main__resume-base-body-item-buttons">
329 <button type="button" data-id="{{ $res->id }}" id="elem{{ $res->id }}" class="like js-toggle js_box_favorit {{ \App\Classes\LikesClass::get_status_worker($res) }}" data-val="{{ $res->id }}"> 329 <button type="button" data-id="{{ $res->id }}" id="elem{{ $res->id }}" class="like js-toggle js_box_favorit {{ \App\Classes\LikesClass::get_status_worker($res) }}" data-val="{{ $res->id }}">
330 <svg> 330 <svg>
331 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> 331 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use>
332 </svg> 332 </svg>
333 </button> 333 </button>
334 @guest 334 @guest
335 <button type="button" data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' 335 <button type="button" data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}'
336 class="chat js-toggle js_it_button"> 336 class="chat js-toggle js_it_button">
337 <svg> 337 <svg>
338 <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use> 338 <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use>
339 </svg> 339 </svg>
340 </button> 340 </button>
341 @else 341 @else
342 @if (App\Classes\StatusUser::Status()==0) 342 @if (App\Classes\StatusUser::Status()==0)
343 @if ((!Auth()->user()->is_worker) && (Auth()->user()->is_message))
343 <button type="button" class="chat js-toggle js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot}}" data-tuid="{{ $res->users->id }}" data-options='{"touch":false,"autoFocus":false}'> 344 <button type="button" class="chat js-toggle js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot}}" data-tuid="{{ $res->users->id }}" data-options='{"touch":false,"autoFocus":false}'>
344 <svg> 345 <svg>
345 <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use> 346 <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use>
346 </svg> 347 </svg>
347 </button> 348 </button>
349 @endif
348 @else 350 @else
349 <button type="button" data-fancybox data-src="#question2" data-options='{"touch":false,"autoFocus":false}' 351 <button type="button" data-fancybox data-src="#question2" data-options='{"touch":false,"autoFocus":false}'
350 class="chat js-toggle js_it_button"> 352 class="chat js-toggle js_it_button">
351 <svg> 353 <svg>
352 <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use> 354 <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use>
353 </svg> 355 </svg>
354 </button> @endif 356 </button>
357 @endif
355 @endif 358 @endif
356 </div> 359 </div>
357 <div class="main__resume-base-body-item-wrapper"> 360 <div class="main__resume-base-body-item-wrapper">
358 <img src="@isset ($res->photo) {{ asset(Storage::url($res->photo)) }} @else {{ asset('images/default_man.jpg')}} @endif" alt="" class="main__resume-base-body-item-photo"> 361 <img src="@isset ($res->photo) {{ asset(Storage::url($res->photo)) }} @else {{ asset('images/default_man.jpg')}} @endif" alt="" class="main__resume-base-body-item-photo">
359 <div class="main__resume-base-body-item-inner"> 362 <div class="main__resume-base-body-item-inner">
360 <div> 363 <div>
361 <b>Статус</b> 364 <b>Статус</b>
362 <span>{{ $status_work[$res->status_work] }}</span> 365 <span>{{ $status_work[$res->status_work] }}</span>
363 </div> 366 </div>
364 <div> 367 <div>
365 <b>Имя работника</b> 368 <b>Имя работника</b>
366 <span>@if (isset($res->users)){{ $res->users->surname." ".$res->users->name_man." ".$res->users->surname2 }} @endif</span> 369 <span>@if (isset($res->users)){{ $res->users->surname." ".$res->users->name_man." ".$res->users->surname2 }} @endif</span>
367 </div> 370 </div>
368 <div> 371 <div>
369 <b>Номер телефона</b> 372 <b>Номер телефона</b>
370 <span><a href="tel:{{ $res->telephone }}">{{ $res->telephone }}</a></span> 373 <span><a href="tel:{{ $res->telephone }}">{{ $res->telephone }}</a></span>
371 </div> 374 </div>
372 <div> 375 <div>
373 <b>Электронный адрес</b> 376 <b>Электронный адрес</b>
374 <span><a href="mailto:{{ $res->email }}">{{ $res->email }}</a></span> 377 <span><a href="mailto:{{ $res->email }}">{{ $res->email }}</a></span>
375 </div> 378 </div>
376 <div> 379 <div>
377 <b>Город проживания</b> 380 <b>Город проживания</b>
378 <span>{{ $res->city }}</span> 381 <span>{{ $res->city }}</span>
379 </div> 382 </div>
380 <div> 383 <div>
381 <b>Опыт работы</b> 384 <b>Опыт работы</b>
382 <span>{{ $res->experience }}</span> 385 <span>{{ $res->experience }}</span>
383 </div> 386 </div>
384 </div> 387 </div>
385 </div> 388 </div>
386 <div class="main__employer-page-two-item-tags"> 389 <div class="main__employer-page-two-item-tags">
387 @if ($res->job_titles->count()) 390 @if ($res->job_titles->count())
388 @if (isset($res->job_titles)) 391 @if (isset($res->job_titles))
389 @foreach ($res->job_titles as $key => $j) 392 @foreach ($res->job_titles as $key => $j)
390 <span class="main__employer-page-two-item-tag">#{{ $j->name }}</span> 393 <span class="main__employer-page-two-item-tag">#{{ $j->name }}</span>
391 @endforeach 394 @endforeach
392 @endif 395 @endif
393 @endif 396 @endif
394 </div> 397 </div>
395 <a href="{{ route('resume_profile', ['worker' => $res->id]) }}" class="button button_light main__resume-base-body-item-link">Перейти в резюме</a> 398 <a href="{{ route('resume_profile', ['worker' => $res->id]) }}" class="button button_light main__resume-base-body-item-link">Перейти в резюме</a>
396 </div> 399 </div>
397 @endforeach 400 @endforeach
398 401
399 {{ $resumes->appends($_GET)->links('paginate') }} 402 {{ $resumes->appends($_GET)->links('paginate') }}
400 @else 403 @else
401 <p>По данному запросу ничего не найдено</p> 404 <p>По данному запросу ничего не найдено</p>
402 @endif 405 @endif
403 </div> 406 </div>
404 </div> 407 </div>
405 <div class="main__resume-base-body" data-body="2"> 408 <div class="main__resume-base-body" data-body="2">
406 <div class="main__resume-base-body-two" id="block2" name="block2"> 409 <div class="main__resume-base-body-two" id="block2" name="block2">
407 @if ($resumes->count()) 410 @if ($resumes->count())
408 @foreach ($resumes as $res) 411 @foreach ($resumes as $res)
409 <div class="main__resume-base-body-item"> 412 <div class="main__resume-base-body-item">
410 <div class="main__resume-base-body-item-buttons"> 413 <div class="main__resume-base-body-item-buttons">
411 <button type="button" id="elem_{{ $res->id }}" class="like js-toggle js_box_favorit {{ \App\Classes\LikesClass::get_status_worker($res) }}" data-val="{{ $res->id }}"> 414 <button type="button" id="elem_{{ $res->id }}" class="like js-toggle js_box_favorit {{ \App\Classes\LikesClass::get_status_worker($res) }}" data-val="{{ $res->id }}">
412 <svg> 415 <svg>
413 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> 416 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use>
414 </svg> 417 </svg>
415 </button> 418 </button>
416 <button type="button" class="chat js-toggle js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot}}" data-tuid="{{ $res->id }}" data-options='{"touch":false,"autoFocus":false}'> 419 <!--<button type="button" class="chat js-toggle js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid=" $idiot}}" data-tuid=" $res->id }}" data-options='{"touch":false,"autoFocus":false}'>
417 <svg> 420 <svg>
418 <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use> 421 <use xlink:href=" asset('images/sprite.svg#chat') }}"></use>
419 </svg> 422 </svg>
420 </button> 423 </button>-->
424 @guest
425 <button type="button" data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}'
426 class="chat js-toggle js_it_button">
427 <svg>
428 <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use>
429 </svg>
430 </button>
431 @else
432 @if (App\Classes\StatusUser::Status()==0)
433 @if ((!Auth()->user()->is_worker) && (Auth()->user()->is_message))
434 <button type="button" class="chat js-toggle js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot}}" data-tuid="{{ $res->users->id }}" data-options='{"touch":false,"autoFocus":false}'>
435 <svg>
436 <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use>
437 </svg>
438 </button>
439 @endif
440 @else
441 <button type="button" data-fancybox data-src="#question2" data-options='{"touch":false,"autoFocus":false}'
442 class="chat js-toggle js_it_button">
443 <svg>
444 <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use>
445 </svg>
446 </button>
447 @endif
448 @endif
421 </div> 449 </div>
422 <div class="main__resume-base-body-item-wrapper"> 450 <div class="main__resume-base-body-item-wrapper">
423 <img src="@isset ($res->photo) {{ asset(Storage::url($res->photo)) }} @else {{ asset('images/default_man.jpg')}} @endif" alt="" class="main__resume-base-body-item-photo"> 451 <img src="@isset ($res->photo) {{ asset(Storage::url($res->photo)) }} @else {{ asset('images/default_man.jpg')}} @endif" alt="" class="main__resume-base-body-item-photo">
424 <div class="main__resume-base-body-item-inner"> 452 <div class="main__resume-base-body-item-inner">
425 <div> 453 <div>
426 <b>Статус</b> 454 <b>Статус</b>
427 <span>{{ $status_work[$res->status_work] }}</span> 455 <span>{{ $status_work[$res->status_work] }}</span>
428 </div> 456 </div>
429 <div> 457 <div>
430 <b>Имя работника</b> 458 <b>Имя работника</b>
431 <span>@if (isset($res->users)){{ $res->users->surname." ".$res->users->name_man." ".$res->users->surname2 }} @endif</span> 459 <span>@if (isset($res->users)){{ $res->users->surname." ".$res->users->name_man." ".$res->users->surname2 }} @endif</span>
432 </div> 460 </div>
433 <div> 461 <div>
434 <b>Номер телефона</b> 462 <b>Номер телефона</b>
435 <span><a href="tel:{{ $res->telephone }}">{{ $res->telephone }}</a></span> 463 <span><a href="tel:{{ $res->telephone }}">{{ $res->telephone }}</a></span>
436 </div> 464 </div>
437 <div> 465 <div>
438 <b>Электронный адрес</b> 466 <b>Электронный адрес</b>
439 <span><a href="mailto:{{ $res->email }}">{{ $res->email }}</a></span> 467 <span><a href="mailto:{{ $res->email }}">{{ $res->email }}</a></span>
440 </div> 468 </div>
441 <div> 469 <div>
442 <b>Город проживания</b> 470 <b>Город проживания</b>
443 <span>{{ $res->city }}</span> 471 <span>{{ $res->city }}</span>
444 </div> 472 </div>
445 <div> 473 <div>
446 <b>Опыт работы</b> 474 <b>Опыт работы</b>
447 <span>{{ $res->experience }}</span> 475 <span>{{ $res->experience }}</span>
448 </div> 476 </div>
449 </div> 477 </div>
450 </div> 478 </div>
451 <a href="{{ route('resume_profile', ['worker' => $res->id]) }}" class="button button_light main__resume-base-body-item-link">Перейти в 479 <a href="{{ route('resume_profile', ['worker' => $res->id]) }}" class="button button_light main__resume-base-body-item-link">Перейти в
452 резюме</a> 480 резюме</a>
453 </div> 481 </div>
454 @endforeach 482 @endforeach
455 483
456 {{ $resumes->appends($_GET)->links('paginate') }} 484 {{ $resumes->appends($_GET)->links('paginate') }}
457 @endif 485 @endif
458 </div> 486 </div>
459 </div> 487 </div>
460 </div> 488 </div>
461 </div> 489 </div>
462 </main> 490 </main>
463 </div> 491 </div>
464 </div> 492 </div>
465 @endsection 493 @endsection
466 494
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');
450 Route::get('bd_resume_danger', function(){
451 return view('employers.bd_resume_danger');
452 })->name('bd_resume_danger');
447 453
448 Route::get('like-resume', [MainController::class, 'like_worker'])->name('like_resume'); 454 Route::get('like-resume', [MainController::class, 'like_worker'])->name('like_resume');
449 455
450 //Анкета соискателя 456 //Анкета соискателя
451 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');
452 458
453 //Скачать резюме 459 //Скачать резюме
454 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');
455 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');
456 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');
457 463
458 464
459 //Вход в кабинет 465 //Вход в кабинет
460 Route::get('login', [MainController::class, 'input_login'])->name('login'); 466 Route::get('login', [MainController::class, 'input_login'])->name('login');
461 467
462 // Выход из кабинета 468 // Выход из кабинета
463 Route::get('logout', [EmployerController::class, 'logout'])->name('logout'); 469 Route::get('logout', [EmployerController::class, 'logout'])->name('logout');
464 470
465 Route::get( 'register_worker', [WorkerController::class, 'register_worker'])->name('register_worker'); 471 Route::get( 'register_worker', [WorkerController::class, 'register_worker'])->name('register_worker');
466 Route::get('register_employer', [EmployerController::class, 'register_employer'])->name('register_employer'); 472 Route::get('register_employer', [EmployerController::class, 'register_employer'])->name('register_employer');
467 473
468 //восстановление пароля 474 //восстановление пароля
469 Route::get('repair-password', [MainController::class, 'repair_password'])->name('repair_password'); 475 Route::get('repair-password', [MainController::class, 'repair_password'])->name('repair_password');
470 // Звезда сообщения 476 // Звезда сообщения
471 Route::post('stars-answer', [WorkerController::class, 'stars_answer'])->name('stars_answer'); 477 Route::post('stars-answer', [WorkerController::class, 'stars_answer'])->name('stars_answer');
472 478
473 // Борьба 479 // Борьба
474 Route::get('clear_cookie', function() { 480 Route::get('clear_cookie', function() {
475 \App\Classes\Cookies_vacancy::clear_vacancy(); 481 \App\Classes\Cookies_vacancy::clear_vacancy();
476 return redirect()->route('index'); 482 return redirect()->route('index');
477 })->name('clear_cookie'); 483 })->name('clear_cookie');
478 484
479 Route::get('cookies', function() { 485 Route::get('cookies', function() {
480 return view('cookies'); 486 return view('cookies');
481 })->name('cookies'); 487 })->name('cookies');
482 488
483 // Личный кабинет работник 489 // Личный кабинет работник
484 Route::group([ 490 Route::group([
485 'as' => 'worker.', // имя маршрута, например auth.index 491 'as' => 'worker.', // имя маршрута, например auth.index
486 'prefix' => 'worker', // префикс маршрута, например auth/index 492 'prefix' => 'worker', // префикс маршрута, например auth/index
487 'middleware' => ['auth'], ['is_worker'], 493 'middleware' => ['auth'], ['is_worker'],
488 ], function() { 494 ], function() {
489 // 1 страница - Моя анкета 495 // 1 страница - Моя анкета
490 Route::get('cabinet', [WorkerController::class, 'cabinet'])->name('cabinet'); 496 Route::get('cabinet', [WorkerController::class, 'cabinet'])->name('cabinet');
491 Route::post('cabinet/{worker}', [WorkerController::class, 'cabinet_save'])->name('cabinet_save'); 497 Route::post('cabinet/{worker}', [WorkerController::class, 'cabinet_save'])->name('cabinet_save');
492 498
493 // 2 страница - Сообщения 499 // 2 страница - Сообщения
494 Route::get('cabinet/messages/{type_message}', [WorkerController::class, 'messages'])->name('messages'); 500 Route::get('cabinet/messages/{type_message}', [WorkerController::class, 'messages'])->name('messages');
495 Route::get('cabinet/dialog/{user1}/{user2}', [WorkerController::class, 'dialog'])->name('dialog'); 501 Route::get('cabinet/dialog/{user1}/{user2}', [WorkerController::class, 'dialog'])->name('dialog');
496 // 3 страница - Избранные вакансии 502 // 3 страница - Избранные вакансии
497 Route::get('cabinet/favorite', [WorkerController::class, 'favorite'])->name('favorite'); 503 Route::get('cabinet/favorite', [WorkerController::class, 'favorite'])->name('favorite');
498 // Продолжение борьбы против колорадов - избранные вакансии 504 // Продолжение борьбы против колорадов - избранные вакансии
499 Route::get('кабинет/favorite', [WorkerController::class, 'colorado'])->name('colorado'); 505 Route::get('кабинет/favorite', [WorkerController::class, 'colorado'])->name('colorado');
500 506
501 // 4 страница - Сменить пароль 507 // 4 страница - Сменить пароль
502 Route::get('кабинет/new_password', [WorkerController::class, 'new_password'])->name('new_password'); 508 Route::get('кабинет/new_password', [WorkerController::class, 'new_password'])->name('new_password');
503 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');
504 510
505 // 5 страница - Удалить профиль 511 // 5 страница - Удалить профиль
506 Route::get('кабинет/delete_profile', [WorkerController::class, 'delete_profile'])->name('delete_profile'); 512 Route::get('кабинет/delete_profile', [WorkerController::class, 'delete_profile'])->name('delete_profile');
507 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');
508 514
509 // Резюме -pdf 515 // Резюме -pdf
510 Route::get('кабинет/download/{worker}', [WorkerController::class, 'download'])->name('download'); 516 Route::get('кабинет/download/{worker}', [WorkerController::class, 'download'])->name('download');
511 517
512 // Поднятие анкеты 518 // Поднятие анкеты
513 Route::get('кабинет/up/{worker}', [WorkerController::class, 'up'])->name('up'); 519 Route::get('кабинет/up/{worker}', [WorkerController::class, 'up'])->name('up');
514 520
515 // Добавление сертификата 521 // Добавление сертификата
516 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');
517 Route::get('кабинет/add_sertificate', [WorkerController::class, 'add_serificate'])->name('add_serificate'); 523 Route::get('кабинет/add_sertificate', [WorkerController::class, 'add_serificate'])->name('add_serificate');
518 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');
519 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');
520 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');
521 527
522 // Добавление предыдущих контактов компании 528 // Добавление предыдущих контактов компании
523 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');
524 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');
525 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');
526 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');
527 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');
528 534
529 // Добавление документа-диплома 535 // Добавление документа-диплома
530 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');
531 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');
532 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');
533 539
534 // Добавление стандартного диплома 540 // Добавление стандартного диплома
535 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');
536 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');
537 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');
538 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');
539 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');
540 546
541 // Отправка сообщения работодателю от соискателя 547 // Отправка сообщения работодателю от соискателя
542 Route::post('сообщение/', [WorkerController::class, 'new_message'])->name('new_message'); 548 Route::post('сообщение/', [WorkerController::class, 'new_message'])->name('new_message');
543 }); 549 });
544 550
545 // Личный кабинет работодателя 551 // Личный кабинет работодателя
546 Route::group([ 552 Route::group([
547 'as' => 'employer.', // имя маршрута, например auth.index 553 'as' => 'employer.', // имя маршрута, например auth.index
548 'prefix' => 'employer', // префикс маршрута, например auth/index 554 'prefix' => 'employer', // префикс маршрута, например auth/index
549 'middleware' => ['auth'], !['is_worker'], 555 'middleware' => ['auth'], !['is_worker'],
550 ], function() { 556 ], function() {
551 // 0 страница - Личные данные работодателя 557 // 0 страница - Личные данные работодателя
552 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');
553 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');
554 560
555 // 1 страница - Профиль 561 // 1 страница - Профиль
556 Route::get('cabinet', [EmployerController::class, 'cabinet'])->name('cabinet'); 562 Route::get('cabinet', [EmployerController::class, 'cabinet'])->name('cabinet');
557 Route::post('cabinet/{Employer}', [EmployerController::class, 'cabinet_save'])->name('cabinet_save'); 563 Route::post('cabinet/{Employer}', [EmployerController::class, 'cabinet_save'])->name('cabinet_save');
558 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');
559 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');
560 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');
561 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');
562 Route::get('cabinet/flot', [EmployerController::class, 'slider_flot'])->name('slider_flot'); 568 Route::get('cabinet/flot', [EmployerController::class, 'slider_flot'])->name('slider_flot');
563 569
564 // 2 страница - Добавление вакансий 570 // 2 страница - Добавление вакансий
565 Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie'); 571 Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie');
566 Route::post('vacancie', [EmployerController::class, 'cabinet_vacancy_save1'])->name('vac_save'); 572 Route::post('vacancie', [EmployerController::class, 'cabinet_vacancy_save1'])->name('vac_save');
573 //Route::get('selected_people', [EmployerController::class, 'selected_people'])->name('selected_people');
574
567 Route::get('selected_people', [EmployerController::class, 'selected_people'])->name('selected_people'); 575 Route::get('cabinet/vacancie_danger', [EmployerController::class, 'cabinet_vacancie_danger'])->name('cabinet_vacancie_danger');
568 576
569 577
570 Route::get('selected_people', [EmployerController::class, 'selected_people'])->name('selected_people'); 578
571 579 Route::get('selected_people', [EmployerController::class, 'selected_people'])->name('selected_people');
572 // 3 страница - Мои вакансии 580
573 Route::get('cabinet/vacancy_list', [EmployerController::class, 'vacancy_list'])->name('vacancy_list'); 581 // 3 страница - Мои вакансии
574 Route::get('cabinet/vacancy/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); 582 Route::get('cabinet/vacancy_list', [EmployerController::class, 'vacancy_list'])->name('vacancy_list');
575 Route::get('cabinet/vacancy-delete/{ad_employer}', [EmployerController::class, 'vacancy_delete'])->name('vacancy_delete'); 583 Route::get('cabinet/vacancy/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit');
576 Route::get('cabinet/vacancy-up/{ad_employer}', [EmployerController::class, 'vacancy_up'])->name('vacancy_up'); 584 Route::get('cabinet/vacancy-delete/{ad_employer}', [EmployerController::class, 'vacancy_delete'])->name('vacancy_delete');
577 Route::get('cabinet/vacancy-eye/{ad_employer}/{status}', [EmployerController::class, 'vacancy_eye'])->name('vacancy_eye'); 585 Route::get('cabinet/vacancy-up/{ad_employer}', [EmployerController::class, 'vacancy_up'])->name('vacancy_up');
578 Route::get('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit'); 586 Route::get('cabinet/vacancy-eye/{ad_employer}/{status}', [EmployerController::class, 'vacancy_eye'])->name('vacancy_eye');
579 Route::post('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_save_me'])->name('vacancy_save_me'); 587 Route::get('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_edit'])->name('vacancy_edit');
580 588 Route::post('cabinet/vacancy-edit/{ad_employer}', [EmployerController::class, 'vacancy_save_me'])->name('vacancy_save_me');
581 // 4.1Ю. 589
582 Route::get('cabinet/ad_jobs/create/{ad_employer}', [Ad_jobsController::class, 'add_job_in_vac'])->name('add_job_in_vac'); 590 // 4.1Ю.
583 Route::post('cabinet/ad_jobs/create', [Ad_jobsController::class, 'add_job_in_vac_save'])->name('add_job_in_vac_save'); 591 Route::get('cabinet/ad_jobs/create/{ad_employer}', [Ad_jobsController::class, 'add_job_in_vac'])->name('add_job_in_vac');
584 Route::get('cabinet/ad_jobs/edit/{ad_job}/{ad_employer}', [Ad_jobsController::class, 'edit_job_in_vac'])->name('edit_job_in_vac'); 592 Route::post('cabinet/ad_jobs/create', [Ad_jobsController::class, 'add_job_in_vac_save'])->name('add_job_in_vac_save');
585 Route::post('cabinet/ad_jobs/edit/{ad_job}', [Ad_jobsController::class, 'edit_job_in_vac_save'])->name('edit_job_in_vac_save'); 593 Route::get('cabinet/ad_jobs/edit/{ad_job}/{ad_employer}', [Ad_jobsController::class, 'edit_job_in_vac'])->name('edit_job_in_vac');
586 Route::get('cabinet/ad_jobs/delete/{ad_job}', [Ad_jobsController::class, 'delete_job_in_vac'])->name('delete_job_in_vac'); 594 Route::post('cabinet/ad_jobs/edit/{ad_job}', [Ad_jobsController::class, 'edit_job_in_vac_save'])->name('edit_job_in_vac_save');
587 595 Route::get('cabinet/ad_jobs/delete/{ad_job}', [Ad_jobsController::class, 'delete_job_in_vac'])->name('delete_job_in_vac');
588 // 4 страница - Отклики на вакансии 596
589 Route::get('cabinet/answers/{employer}', [EmployerController::class, 'answers'])->name('answers'); 597 // 4 страница - Отклики на вакансии
590 Route::get('cabinet/status/{employer}', [EmployerController::class, 'supple_status2'])->name('supple'); 598 Route::get('cabinet/answers/{employer}', [EmployerController::class, 'answers'])->name('answers');
591 Route::get('status/{employer}/{ad_response}/{flag}', [EmployerController::class, 'supple_status'])->name('status_msg'); 599 Route::get('cabinet/status/{employer}', [EmployerController::class, 'supple_status2'])->name('supple');
592 600 Route::get('status/{employer}/{ad_response}/{flag}', [EmployerController::class, 'supple_status'])->name('status_msg');
593 // 5 страница - Сообщения 601
594 Route::get('cabinet/messages/{type_message}', [EmployerController::class, 'messages'])->name('messages'); 602 // 5 страница - Сообщения
595 Route::get('cabinet/dialog/{user1}/{user2}', [EmployerController::class, 'dialog'])->name('dialog'); 603 Route::get('cabinet/messages/{type_message}', [EmployerController::class, 'messages'])->name('messages');
596 Route::post('cabinet/send-message', [EmployerController::class, 'send_message'])->name('send_message'); 604 Route::get('cabinet/dialog/{user1}/{user2}', [EmployerController::class, 'dialog'])->name('dialog');
597 Route::post('test123', [EmployerController::class, 'test123'])->name('test123'); 605 Route::post('cabinet/send-message', [EmployerController::class, 'send_message'])->name('send_message');
598 606 Route::post('test123', [EmployerController::class, 'test123'])->name('test123');
599 // 6 страница - Избранный 607
600 Route::get('cabinet/favorites', [EmployerController::class, 'favorites'])->name('favorites'); 608 // 6 страница - Избранный
601 609 Route::get('cabinet/favorites', [EmployerController::class, 'favorites'])->name('favorites');
602 //7 страница - База данных 610
603 Route::get('cabinet/bd', [EmployerController::class, 'bd'])->name('bd'); 611 //7 страница - База данных
604 612 Route::get('cabinet/bd', [EmployerController::class, 'bd'])->name('bd');
605 //8 страница - База резюме 613
606 Route::get('cabinet/bd-tupe', [EmployerController::class, 'bd_tupe'])->name('bd-tupe'); 614 //8 страница - База резюме
607 615 Route::get('cabinet/bd-tupe', [EmployerController::class, 'bd_tupe'])->name('bd-tupe');
608 // 9 рассылка сообщений 616
609 Route::get('cabinet/send-all-messages', [EmployerController::class, 'send_all_messages'])->name('send_all_messages'); 617 // 9 рассылка сообщений
610 Route::post('cabinet/send-all-messages/send', [EmployerController::class, 'send_all_post'])->name('send_all_post'); 618 Route::get('cabinet/send-all-messages', [EmployerController::class, 'send_all_messages'])->name('send_all_messages');
611 619 Route::post('cabinet/send-all-messages/send', [EmployerController::class, 'send_all_post'])->name('send_all_post');
612 // 10 страница FAQ вопросы 620
613 Route::get('cabinet/faq', [EmployerController::class, 'faq'])->name('faq'); 621 // 10 страница FAQ вопросы
614 622 Route::get('cabinet/faq', [EmployerController::class, 'faq'])->name('faq');
615 // 11 страница - Настройка уведомлений 623
616 Route::get('cabinet/subscribe', [EmployerController::class, 'subscribe'])->name('subscribe'); 624 // 11 страница - Настройка уведомлений
617 Route::get('cabinet/subscribe/save', [EmployerController::class, 'save_subscribe'])->name('save_subscribe'); 625 Route::get('cabinet/subscribe', [EmployerController::class, 'subscribe'])->name('subscribe');
618 626 Route::get('cabinet/subscribe/save', [EmployerController::class, 'save_subscribe'])->name('save_subscribe');
619 // 12 страница - Сменить пароль 627
620 Route::get('cabinet/password-reset', [EmployerController::class, 'password_reset'])->name('password_reset'); 628 // 12 страница - Сменить пароль
621 Route::get('cabinet/password-reset/new', [EmployerController::class, 'new_password'])->name('new_password'); 629 Route::get('cabinet/password-reset', [EmployerController::class, 'password_reset'])->name('password_reset');
622 630 Route::get('cabinet/password-reset/new', [EmployerController::class, 'new_password'])->name('new_password');
623 // 13 страница - Удаление профиля 631
624 Route::get('cabinet/delete-people', [EmployerController::class, 'delete_people'])->name('delete_people'); 632 // 13 страница - Удаление профиля
625 Route::get('cabinet/action-delete-people', [EmployerController::class, 'action_delete_user'])->name('action_delete_user'); 633 Route::get('cabinet/delete-people', [EmployerController::class, 'delete_people'])->name('delete_people');
626 Route::get('cabinet/action-ajax-delete-people', [EmployerController::class, 'ajax_delete_user'])->name('ajax_delete_user'); 634 Route::get('cabinet/action-delete-people', [EmployerController::class, 'action_delete_user'])->name('action_delete_user');
627 635 Route::get('cabinet/action-ajax-delete-people', [EmployerController::class, 'ajax_delete_user'])->name('ajax_delete_user');
628 // Отправил сообщение 636
629 Route::post('сообщение/', [EmployerController::class, 'new_message'])->name('new_message'); 637 // Отправил сообщение
630 }); 638 Route::post('сообщение/', [EmployerController::class, 'new_message'])->name('new_message');
631 639 });
632 Route::get('TestWorker', [WorkerController::class, 'TestWorker'])->name('TestWorker'); 640
633 641 Route::get('TestWorker', [WorkerController::class, 'TestWorker'])->name('TestWorker');
634 642
643