Commit 2e9be88ab5bbc01500860cbf0e1317d7500d03fa
1 parent
eda864c1e5
Exists in
master
and in
1 other branch
Коммит Обновление-критическое
Showing 11 changed files with 82 additions and 31 deletions Inline Diff
- app/Http/Controllers/Admin/JobTitlesController.php
- app/Http/Controllers/Admin/MsgAnswersController.php
- app/Http/Controllers/EmployerController.php
- app/Http/Controllers/PagesController.php
- resources/views/TITLE_TEXT.blade.php
- resources/views/admin/answers/index.blade.php
- resources/views/admin/job_titles/index.blade.php
- resources/views/employers/list_vacancy.blade.php
- resources/views/employers/subcribe.blade.php
- resources/views/index.blade.php
- resources/views/pages.blade.php
app/Http/Controllers/Admin/JobTitlesController.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace App\Http\Controllers\Admin; | 3 | namespace App\Http\Controllers\Admin; |
4 | 4 | ||
5 | use App\Http\Controllers\Controller; | 5 | use App\Http\Controllers\Controller; |
6 | use App\Http\Requests\JobTitlesRequest; | 6 | use App\Http\Requests\JobTitlesRequest; |
7 | use App\Models\Category; | 7 | use App\Models\Category; |
8 | use App\Models\Job_title; | 8 | use App\Models\Job_title; |
9 | use App\Models\Positions; | 9 | use App\Models\Positions; |
10 | use Illuminate\Http\Request; | 10 | use Illuminate\Http\Request; |
11 | 11 | ||
12 | class JobTitlesController extends Controller | 12 | class JobTitlesController extends Controller |
13 | { | 13 | { |
14 | /** | 14 | /** |
15 | * Display a listing of the resource. | 15 | * Display a listing of the resource. |
16 | * | 16 | * |
17 | * @return \Illuminate\Http\Response | 17 | * @return \Illuminate\Http\Response |
18 | */ | 18 | */ |
19 | public function index() | 19 | public function index(Request $request) |
20 | { | 20 | { |
21 | $Jobs = Job_title::query()->where('is_remove', '=', '0')-> | 21 | if ($request->has('sort')) { |
22 | orderByDesc('sort')->orderBy('name')->paginate(15); | 22 | $Jobs = Job_title::query()->where('is_remove', '=', '0'); |
23 | if ($request->get('sort') == 'up') | ||
24 | $Jobs = $Jobs->orderBy('sort')->orderBy('name')->paginate(15); | ||
25 | else | ||
26 | $Jobs = $Jobs->orderByDesc('sort')->orderBy('name')->paginate(15); | ||
27 | } else { | ||
28 | $Jobs = Job_title::query()->where('is_remove', '=', '0')-> | ||
29 | orderByDesc('sort')->orderBy('name')->paginate(15); | ||
30 | } | ||
31 | |||
23 | return view('admin.job_titles.index', compact('Jobs')); | 32 | return view('admin.job_titles.index', compact('Jobs')); |
24 | } | 33 | } |
25 | 34 | ||
26 | /** | 35 | /** |
27 | * Show the form for creating a new resource. | 36 | * Show the form for creating a new resource. |
28 | * | 37 | * |
29 | * @return \Illuminate\Http\Response | 38 | * @return \Illuminate\Http\Response |
30 | */ | 39 | */ |
31 | public function create() | 40 | public function create() |
32 | { | 41 | { |
33 | /*$items = Job_title::query()-> | 42 | /*$items = Job_title::query()-> |
34 | orderByDesc('sort')-> | 43 | orderByDesc('sort')-> |
35 | orderBy('name')-> | 44 | orderBy('name')-> |
36 | active()-> | 45 | active()-> |
37 | get();*/ | 46 | get();*/ |
38 | $category = Category::query()->active()->get(); | 47 | $category = Category::query()->active()->get(); |
39 | 48 | ||
40 | return view('admin.job_titles.add', compact('category')); | 49 | return view('admin.job_titles.add', compact('category')); |
41 | } | 50 | } |
42 | 51 | ||
43 | /** | 52 | /** |
44 | * Store a newly created resource in storage. | 53 | * Store a newly created resource in storage. |
45 | * | 54 | * |
46 | * @param \Illuminate\Http\Request $request | 55 | * @param \Illuminate\Http\Request $request |
47 | * @return \Illuminate\Http\Response | 56 | * @return \Illuminate\Http\Response |
48 | */ | 57 | */ |
49 | public function store(JobTitlesRequest $request) | 58 | public function store(JobTitlesRequest $request) |
50 | { | 59 | { |
51 | Job_title::create($request->all()); | 60 | Job_title::create($request->all()); |
52 | return redirect()->route('admin.job-titles.index'); | 61 | return redirect()->route('admin.job-titles.index'); |
53 | } | 62 | } |
54 | 63 | ||
55 | /** | 64 | /** |
56 | * Display the specified resource. | 65 | * Display the specified resource. |
57 | * | 66 | * |
58 | * @param \App\Models\Job_title $job_title | 67 | * @param \App\Models\Job_title $job_title |
59 | * @return \Illuminate\Http\Response | 68 | * @return \Illuminate\Http\Response |
60 | */ | 69 | */ |
61 | public function show(Job_title $job_title) | 70 | public function show(Job_title $job_title) |
62 | { | 71 | { |
63 | // | 72 | // |
64 | } | 73 | } |
65 | 74 | ||
66 | /** | 75 | /** |
67 | * Show the form for editing the specified resource. | 76 | * Show the form for editing the specified resource. |
68 | * | 77 | * |
69 | * @param \App\Models\Job_title $job_title | 78 | * @param \App\Models\Job_title $job_title |
70 | * @return \Illuminate\Http\Response | 79 | * @return \Illuminate\Http\Response |
71 | */ | 80 | */ |
72 | public function edit(Job_title $job_title) | 81 | public function edit(Job_title $job_title) |
73 | { | 82 | { |
74 | $category = Category::query()->active()->get(); | 83 | $category = Category::query()->active()->get(); |
75 | return view('admin.job_titles.edit', compact('job_title', 'category')); | 84 | return view('admin.job_titles.edit', compact('job_title', 'category')); |
76 | } | 85 | } |
77 | 86 | ||
78 | /** | 87 | /** |
79 | * Update the specified resource in storage. | 88 | * Update the specified resource in storage. |
80 | * | 89 | * |
81 | * @param \Illuminate\Http\Request $request | 90 | * @param \Illuminate\Http\Request $request |
82 | * @param \App\Models\Job_title $job_title | 91 | * @param \App\Models\Job_title $job_title |
83 | * @return \Illuminate\Http\Response | 92 | * @return \Illuminate\Http\Response |
84 | */ | 93 | */ |
85 | public function update(JobTitlesRequest $request, Job_title $job_title) | 94 | public function update(JobTitlesRequest $request, Job_title $job_title) |
86 | { | 95 | { |
87 | $job_title->update($request->all()); | 96 | $job_title->update($request->all()); |
88 | return redirect()->route('admin.job-titles.index'); | 97 | return redirect()->route('admin.job-titles.index'); |
89 | } | 98 | } |
90 | 99 | ||
91 | /** | 100 | /** |
92 | * Remove the specified resource from storage. | 101 | * Remove the specified resource from storage. |
93 | * | 102 | * |
94 | * @param \App\Models\Job_title $job_title | 103 | * @param \App\Models\Job_title $job_title |
95 | * @return \Illuminate\Http\Response | 104 | * @return \Illuminate\Http\Response |
96 | */ | 105 | */ |
97 | public function destroy(Job_title $job_title) | 106 | public function destroy(Job_title $job_title) |
98 | { | 107 | { |
99 | $job_title->update(['is_remove' => 1]); | 108 | $job_title->update(['is_remove' => 1]); |
100 | return redirect()->route('admin.job-titles.index'); | 109 | return redirect()->route('admin.job-titles.index'); |
101 | } | 110 | } |
102 | } | 111 | } |
103 | 112 |
app/Http/Controllers/Admin/MsgAnswersController.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace App\Http\Controllers\Admin; | 3 | namespace App\Http\Controllers\Admin; |
4 | 4 | ||
5 | use App\Http\Controllers\Controller; | 5 | use App\Http\Controllers\Controller; |
6 | use App\Models\Message; | 6 | use App\Models\Message; |
7 | use App\Models\User; | 7 | use App\Models\User; |
8 | use Illuminate\Database\Eloquent\Builder; | 8 | use Illuminate\Database\Eloquent\Builder; |
9 | use Illuminate\Http\Request; | 9 | use Illuminate\Http\Request; |
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\Validator; | 12 | use Illuminate\Support\Facades\Validator; |
13 | 13 | ||
14 | class MsgAnswersController extends Controller | 14 | class MsgAnswersController extends Controller |
15 | { | 15 | { |
16 | public function messages(Request $request) { | 16 | public function messages(Request $request) { |
17 | $find_key = ""; | 17 | $find_key = ""; |
18 | $find_cat = ""; | 18 | $find_cat = ""; |
19 | $Msgs = Message::with('user_from')->with('user_to'); //->with('response'); | 19 | $Msgs = Message::with('user_from')->with('user_to'); //->with('response'); |
20 | 20 | ||
21 | $Msgs = $this->filter($Msgs, $request, $find_key, $find_cat); | 21 | $Msgs = $this->filter($Msgs, $request, $find_key, $find_cat); |
22 | 22 | ||
23 | $Msgs = $Msgs->orderByDesc('created_at')->paginate(25); | 23 | $Msgs = $Msgs->orderByDesc('created_at')->paginate(25); |
24 | 24 | ||
25 | return view('admin.messages', compact('Msgs', 'find_key', 'find_cat')); | 25 | return view('admin.messages', compact('Msgs', 'find_key', 'find_cat')); |
26 | } | 26 | } |
27 | 27 | ||
28 | public function read_message(Message $message) { | 28 | public function read_message(Message $message) { |
29 | return view('admin.message-read', compact('message')); | 29 | return view('admin.message-read', compact('message')); |
30 | } | 30 | } |
31 | 31 | ||
32 | public function filter($Msgs, Request $request, &$find_key, &$find_cat) { | 32 | public function filter($Msgs, Request $request, &$find_key, &$find_cat) { |
33 | if (isset($request->find)) { | 33 | if (isset($request->find)) { |
34 | $find_key = $request->find; | 34 | $find_key = $request->find; |
35 | $Msgs = $Msgs->where(function($q) use ($find_key) { | 35 | $Msgs = $Msgs->where(function($q) use ($find_key) { |
36 | $q->whereHas('user_from', | 36 | $q->whereHas('user_from', |
37 | function (Builder $query) use ($find_key) { | 37 | function (Builder $query) use ($find_key) { |
38 | $query->where('name', 'LIKE', "%$find_key%"); | 38 | $query->where('name', 'LIKE', "%$find_key%"); |
39 | } | 39 | } |
40 | )-> | 40 | )-> |
41 | orWhereHas('user_to', | 41 | orWhereHas('user_to', |
42 | function (Builder $query) use ($find_key) { | 42 | function (Builder $query) use ($find_key) { |
43 | $query->where('name', 'LIKE', "%$find_key%"); | 43 | $query->where('name', 'LIKE', "%$find_key%"); |
44 | } | 44 | } |
45 | ); | 45 | ); |
46 | }); | 46 | }); |
47 | } | 47 | } |
48 | 48 | ||
49 | if (isset($request->category)) { | 49 | if (isset($request->category)) { |
50 | $find_cat = $request->category; | 50 | $find_cat = $request->category; |
51 | 51 | ||
52 | switch ($find_cat) { | 52 | switch ($find_cat) { |
53 | case 'Работодатели': | 53 | case 'Работодатели': |
54 | $Msgs = $Msgs->where(function($q) { | 54 | $Msgs = $Msgs->where(function($q) { |
55 | $q->whereHas('user_to', | 55 | $q->whereHas('user_to', |
56 | function (Builder $query) { | 56 | function (Builder $query) { |
57 | $query->where('is_worker', '0'); | 57 | $query->where('is_worker', '0'); |
58 | } | 58 | } |
59 | )->orwhereHas('user_from', | 59 | )->orwhereHas('user_from', |
60 | function (Builder $query) { | 60 | function (Builder $query) { |
61 | $query->where('is_worker', '0'); | 61 | $query->where('is_worker', '0'); |
62 | } | 62 | } |
63 | ); | 63 | ); |
64 | }); | 64 | }); |
65 | break; | 65 | break; |
66 | case 'Соискатели': | 66 | case 'Соискатели': |
67 | $Msgs = $Msgs->where(function($q) { | 67 | $Msgs = $Msgs->where(function($q) { |
68 | $q->whereHas('user_to', | 68 | $q->whereHas('user_to', |
69 | function (Builder $query) { | 69 | function (Builder $query) { |
70 | $query->where('is_worker', '1'); | 70 | $query->where('is_worker', '1'); |
71 | } | 71 | } |
72 | )->orwhereHas('user_from', | 72 | )->orwhereHas('user_from', |
73 | function (Builder $query) { | 73 | function (Builder $query) { |
74 | $query->where('is_worker', '1'); | 74 | $query->where('is_worker', '1'); |
75 | } | 75 | } |
76 | ); | 76 | ); |
77 | }); | 77 | }); |
78 | break; | 78 | break; |
79 | case 'Администраторы': | 79 | case 'Администраторы': |
80 | $Msgs = $Msgs->where(function($q) { | 80 | $Msgs = $Msgs->where(function($q) { |
81 | $q->whereHas('user_to', | 81 | $q->whereHas('user_to', |
82 | function (Builder $query) { | 82 | function (Builder $query) { |
83 | $query->where('admin', '1'); | 83 | $query->where('admin', '1'); |
84 | } | 84 | } |
85 | )->orwhereHas('user_from', | 85 | )->orwhereHas('user_from', |
86 | function (Builder $query) { | 86 | function (Builder $query) { |
87 | $query->where('admin', '1'); | 87 | $query->where('admin', '1'); |
88 | } | 88 | } |
89 | ); | 89 | ); |
90 | }); | 90 | }); |
91 | break; | 91 | break; |
92 | default:break; | 92 | default:break; |
93 | } | 93 | } |
94 | } | 94 | } |
95 | 95 | ||
96 | return $Msgs; | 96 | return $Msgs; |
97 | 97 | ||
98 | } | 98 | } |
99 | 99 | ||
100 | public function admin_messages(Request $request) { | 100 | public function admin_messages(Request $request) { |
101 | if ($request->ajax()) { | 101 | if ($request->ajax()) { |
102 | $msg = Message::find($request->id); | 102 | $msg = Message::find($request->id); |
103 | $msg->flag_new = !($request->flag_new); | 103 | $msg->flag_new = !($request->flag_new); |
104 | $msg->save(); | 104 | $msg->save(); |
105 | } | 105 | } |
106 | 106 | ||
107 | $id_admin = Auth::user()->id; | 107 | $id_admin = Auth::user()->id; |
108 | $users = User::query()->OrderBy('name')->where('is_bd', '=', '0')->get(); | 108 | $users = User::query()->OrderBy('name')->where('is_bd', '=', '0')->get(); |
109 | 109 | ||
110 | $Msgs = Message::with('user_from')->with('user_to')->with('response') | 110 | $Msgs = Message::with('user_from')->with('user_to') //->with('response') |
111 | ->where(function($query) use ($id_admin) { | 111 | ->where(function($query) use ($id_admin) { |
112 | $query->where('user_id', '=', $id_admin) | 112 | $query->where('user_id', '=', $id_admin) |
113 | ->orWhere('to_user_id', '=', $id_admin); | 113 | ->orWhere('to_user_id', '=', $id_admin); |
114 | }); | 114 | }); |
115 | 115 | ||
116 | $find_key = ''; | 116 | $find_key = ''; |
117 | $find_cat = ''; | 117 | $find_cat = ''; |
118 | 118 | ||
119 | $Msgs = $this->filter($Msgs, $request, $find_key, $find_cat); | 119 | $Msgs = $this->filter($Msgs, $request, $find_key, $find_cat); |
120 | 120 | ||
121 | $Msgs = $Msgs->orderByDesc('created_at')->paginate(5); | 121 | $Msgs = $Msgs->orderByDesc('created_at')->paginate(5); |
122 | 122 | ||
123 | if ($request->ajax()) | 123 | if ($request->ajax()) |
124 | return view('admin.message.index_ajax', compact('Msgs', 'id_admin', 'users')); | 124 | return view('admin.message.index_ajax', compact('Msgs', 'id_admin', 'users')); |
125 | else | 125 | else |
126 | return view('admin.message.index', compact('Msgs', 'id_admin', 'users', 'find_key', 'find_cat')); | 126 | return view('admin.message.index', compact('Msgs', 'id_admin', 'users', 'find_key', 'find_cat')); |
127 | } | 127 | } |
128 | 128 | ||
129 | public function messages_sql(Request $request) { | 129 | public function messages_sql(Request $request) { |
130 | $id = Auth::user()->id; | 130 | $id = Auth::user()->id; |
131 | DB::enableQueryLog(); | 131 | DB::enableQueryLog(); |
132 | //$query = DB::select('select * from users where id = :id', ['id' => 1]); | 132 | //$query = DB::select('select * from users where id = :id', ['id' => 1]); |
133 | $query = DB::select(DB::raw('SELECT u1.name as "To-user", u2.name as "From-user", m1.`text`, m1.created_at | 133 | $query = DB::select(DB::raw('SELECT u1.name as "To-user", u2.name as "From-user", m1.`text`, m1.created_at |
134 | FROM messages m1 | 134 | FROM messages m1 |
135 | JOIN (SELECT MAX(id) id FROM messages | 135 | JOIN (SELECT MAX(id) id FROM messages |
136 | GROUP BY LEAST(user_id, to_user_id), | 136 | GROUP BY LEAST(user_id, to_user_id), |
137 | GREATEST(user_id, to_user_id) | 137 | GREATEST(user_id, to_user_id) |
138 | ) m2 USING (id) | 138 | ) m2 USING (id) |
139 | JOIN users u1 ON u1.id = m1.user_id | 139 | JOIN users u1 ON u1.id = m1.user_id |
140 | JOIN users u2 ON u2.id = m1.to_user_id | 140 | JOIN users u2 ON u2.id = m1.to_user_id |
141 | Where ((m1.user_id = :uid) or (m1.to_user_id = :uid2)) | 141 | Where ((m1.user_id = :uid) or (m1.to_user_id = :uid2)) |
142 | '), ['uid' => $id, 'uid2' => $id]); | 142 | '), ['uid' => $id, 'uid2' => $id]); |
143 | //dump(DB::getQueryLog()); | 143 | //dump(DB::getQueryLog()); |
144 | dd($query); | 144 | dd($query); |
145 | return; | 145 | return; |
146 | } | 146 | } |
147 | 147 | ||
148 | public function admin_messages_post(Request $request) { | 148 | public function admin_messages_post(Request $request) { |
149 | $rules = [ | 149 | $rules = [ |
150 | 'title' => 'required|min:3|max:255', | 150 | 'title' => 'required|min:3|max:255', |
151 | 'text' => 'required|min:1' | 151 | 'text' => 'required|min:1' |
152 | ]; | 152 | ]; |
153 | 153 | ||
154 | $messages = [ | 154 | $messages = [ |
155 | 'required' => 'Поле не может быть пустым!', | 155 | 'required' => 'Поле не может быть пустым!', |
156 | ]; | 156 | ]; |
157 | 157 | ||
158 | $validator = Validator::make($request->all(), $rules, $messages); | 158 | $validator = Validator::make($request->all(), $rules, $messages); |
159 | 159 | ||
160 | if ($validator->fails()) { | 160 | if ($validator->fails()) { |
161 | return redirect()->route('admin.admin-messages')->withErrors($validator); | 161 | return redirect()->route('admin.admin-messages')->withErrors($validator); |
162 | } else { | 162 | } else { |
163 | $params = $request->all(); | 163 | $params = $request->all(); |
164 | $id_admin = Auth::user()->id; | 164 | $id_admin = Auth::user()->id; |
165 | if ($request->has('file')) { | 165 | if ($request->has('file')) { |
166 | $params['file'] = $request->file('file')->store("upload/".$id_admin, 'public'); | 166 | $params['file'] = $request->file('file')->store("upload/".$id_admin, 'public'); |
167 | } | 167 | } |
168 | Message::create($params); | 168 | Message::create($params); |
169 | return redirect()->route('admin.admin-messages'); | 169 | return redirect()->route('admin.admin-messages'); |
170 | } | 170 | } |
171 | } | 171 | } |
172 | } | 172 | } |
173 | 173 |
app/Http/Controllers/EmployerController.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace App\Http\Controllers; | 3 | namespace App\Http\Controllers; |
4 | 4 | ||
5 | use App\Classes\RusDate; | 5 | use App\Classes\RusDate; |
6 | use App\Classes\Tools; | 6 | use App\Classes\Tools; |
7 | use App\Http\Requests\BaseUser_min_Request; | 7 | use App\Http\Requests\BaseUser_min_Request; |
8 | use App\Http\Requests\BaseUserRequest; | 8 | use App\Http\Requests\BaseUserRequest; |
9 | use App\Http\Requests\FlotRequest; | 9 | use App\Http\Requests\FlotRequest; |
10 | use App\Http\Requests\MessagesRequiest; | 10 | use App\Http\Requests\MessagesRequiest; |
11 | use App\Http\Requests\VacancyRequestEdit; | 11 | use App\Http\Requests\VacancyRequestEdit; |
12 | use App\Http\Requests\VacansiaRequiest; | 12 | use App\Http\Requests\VacansiaRequiest; |
13 | use App\Mail\MailSotrudnichestvo; | 13 | use App\Mail\MailSotrudnichestvo; |
14 | use App\Mail\SendAllMessages; | 14 | use App\Mail\SendAllMessages; |
15 | use App\Models\Ad_employer; | 15 | use App\Models\Ad_employer; |
16 | use App\Models\Ad_jobs; | 16 | use App\Models\Ad_jobs; |
17 | use App\Models\ad_response; | 17 | use App\Models\ad_response; |
18 | use App\Models\Category; | 18 | use App\Models\Category; |
19 | use App\Models\Education; | 19 | use App\Models\Education; |
20 | use App\Models\Employer; | 20 | use App\Models\Employer; |
21 | use App\Models\employers_main; | 21 | use App\Models\employers_main; |
22 | use App\Models\Flot; | 22 | use App\Models\Flot; |
23 | use App\Models\Job_title; | 23 | use App\Models\Job_title; |
24 | use App\Models\Like_vacancy; | 24 | use App\Models\Like_vacancy; |
25 | use App\Models\Like_worker; | 25 | use App\Models\Like_worker; |
26 | use App\Models\Message; | 26 | use App\Models\Message; |
27 | use App\Models\Positions; | 27 | use App\Models\Positions; |
28 | use App\Models\Worker; | 28 | use App\Models\Worker; |
29 | use Carbon\Carbon; | 29 | use Carbon\Carbon; |
30 | use Illuminate\Auth\Events\Registered; | 30 | use Illuminate\Auth\Events\Registered; |
31 | use Illuminate\Database\Eloquent\Builder; | 31 | use Illuminate\Database\Eloquent\Builder; |
32 | use Illuminate\Database\Eloquent\Model; | 32 | use Illuminate\Database\Eloquent\Model; |
33 | use Illuminate\Foundation\Auth\User; | 33 | use Illuminate\Foundation\Auth\User; |
34 | use Illuminate\Http\Request; | 34 | use Illuminate\Http\Request; |
35 | use Illuminate\Support\Facades\Auth; | 35 | use Illuminate\Support\Facades\Auth; |
36 | use Illuminate\Support\Facades\Hash; | 36 | use Illuminate\Support\Facades\Hash; |
37 | use Illuminate\Support\Facades\Mail; | 37 | use Illuminate\Support\Facades\Mail; |
38 | use Illuminate\Support\Facades\Storage; | 38 | use Illuminate\Support\Facades\Storage; |
39 | use App\Models\User as User_Model; | 39 | use App\Models\User as User_Model; |
40 | use Illuminate\Support\Facades\Validator; | 40 | use Illuminate\Support\Facades\Validator; |
41 | 41 | ||
42 | class EmployerController extends Controller | 42 | class EmployerController extends Controller |
43 | { | 43 | { |
44 | public function vacancie($vacancy, Request $request) { | 44 | public function vacancie($vacancy, Request $request) { |
45 | $title = 'Заголовок вакансии'; | 45 | $title = 'Заголовок вакансии'; |
46 | $Query = Ad_employer::with('jobs')-> | 46 | $Query = Ad_employer::with('jobs')-> |
47 | with('cat')-> | 47 | with('cat')-> |
48 | with('employer')-> | 48 | with('employer')-> |
49 | with('jobs_code')-> | 49 | with('jobs_code')-> |
50 | select('ad_employers.*')-> | 50 | select('ad_employers.*')-> |
51 | where('id', '=', $vacancy)->get(); | 51 | where('id', '=', $vacancy)->get(); |
52 | 52 | ||
53 | if (isset(Auth()->user()->id)) | 53 | if (isset(Auth()->user()->id)) |
54 | $uid = Auth()->user()->id; | 54 | $uid = Auth()->user()->id; |
55 | else | 55 | else |
56 | $uid = 0; | 56 | $uid = 0; |
57 | $title = $Query[0]->name; | 57 | $title = $Query[0]->name; |
58 | if ($request->ajax()) { | 58 | if ($request->ajax()) { |
59 | return view('ajax.vacance-item', compact('Query','uid')); | 59 | return view('ajax.vacance-item', compact('Query','uid')); |
60 | } else { | 60 | } else { |
61 | return view('vacance-item', compact('title', 'Query', 'uid')); | 61 | return view('vacance-item', compact('title', 'Query', 'uid')); |
62 | } | 62 | } |
63 | } | 63 | } |
64 | 64 | ||
65 | public function logout() { | 65 | public function logout() { |
66 | Auth::logout(); | 66 | Auth::logout(); |
67 | return redirect()->route('index') | 67 | return redirect()->route('index') |
68 | ->with('success', 'Вы вышли из личного кабинета'); | 68 | ->with('success', 'Вы вышли из личного кабинета'); |
69 | } | 69 | } |
70 | 70 | ||
71 | public function employer_info() { | 71 | public function employer_info() { |
72 | // код юзера | 72 | // код юзера |
73 | $user_info = Auth()->user(); | 73 | $user_info = Auth()->user(); |
74 | // вьюшка для вывода данных | 74 | // вьюшка для вывода данных |
75 | return view('employers.info', compact('user_info')); | 75 | return view('employers.info', compact('user_info')); |
76 | } | 76 | } |
77 | 77 | ||
78 | public function employer_info_save(User_Model $user, BaseUser_min_Request $request) { | 78 | public function employer_info_save(User_Model $user, BaseUser_min_Request $request) { |
79 | // Все данные через реквест | 79 | // Все данные через реквест |
80 | $all = $request->all(); | 80 | $all = $request->all(); |
81 | unset($all['_token']); | 81 | unset($all['_token']); |
82 | // обновление | 82 | // обновление |
83 | $user->update($all); | 83 | $user->update($all); |
84 | return redirect()->route('employer.employer_info'); | 84 | return redirect()->route('employer.employer_info'); |
85 | } | 85 | } |
86 | 86 | ||
87 | public function cabinet() { | 87 | public function cabinet() { |
88 | $id = Auth()->user()->id; | 88 | $id = Auth()->user()->id; |
89 | $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> | 89 | $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> |
90 | WhereHas('users', | 90 | WhereHas('users', |
91 | function (Builder $query) use ($id) {$query->Where('id', $id); | 91 | function (Builder $query) use ($id) {$query->Where('id', $id); |
92 | })->get(); | 92 | })->get(); |
93 | return view('employers.cabinet45', compact('Employer')); | 93 | return view('employers.cabinet45', compact('Employer')); |
94 | } | 94 | } |
95 | 95 | ||
96 | public function slider_flot() { | 96 | public function slider_flot() { |
97 | $id = Auth()->user()->id; | 97 | $id = Auth()->user()->id; |
98 | $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> | 98 | $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> |
99 | WhereHas('users', | 99 | WhereHas('users', |
100 | function (Builder $query) use ($id) {$query->Where('id', $id); | 100 | function (Builder $query) use ($id) {$query->Where('id', $id); |
101 | })->get(); | 101 | })->get(); |
102 | return view('employers.fly-flot', compact('Employer')); | 102 | return view('employers.fly-flot', compact('Employer')); |
103 | } | 103 | } |
104 | 104 | ||
105 | public function cabinet_save(Employer $Employer, Request $request) { | 105 | public function cabinet_save(Employer $Employer, Request $request) { |
106 | $params = $request->all(); | 106 | $params = $request->all(); |
107 | $params['user_id'] = Auth()->user()->id; | 107 | $params['user_id'] = Auth()->user()->id; |
108 | $id = $Employer->id; | 108 | $id = $Employer->id; |
109 | 109 | ||
110 | if ($request->has('logo')) { | 110 | if ($request->has('logo')) { |
111 | if (!empty($Employer->logo)) { | 111 | if (!empty($Employer->logo)) { |
112 | Storage::delete($Employer->logo); | 112 | Storage::delete($Employer->logo); |
113 | } | 113 | } |
114 | $params['logo'] = $request->file('logo')->store("employer/$id", 'public'); | 114 | $params['logo'] = $request->file('logo')->store("employer/$id", 'public'); |
115 | } | 115 | } |
116 | 116 | ||
117 | $Employer->update($params); | 117 | $Employer->update($params); |
118 | 118 | ||
119 | return redirect()->route('employer.cabinet')->with('success', 'Данные были успешно сохранены'); | 119 | return redirect()->route('employer.cabinet')->with('success', 'Данные были успешно сохранены'); |
120 | } | 120 | } |
121 | 121 | ||
122 | public function save_add_flot(FlotRequest $request) { | 122 | public function save_add_flot(FlotRequest $request) { |
123 | // отмена | 123 | // отмена |
124 | $params = $request->all(); | 124 | $params = $request->all(); |
125 | 125 | ||
126 | if ($request->has('image')) { | 126 | if ($request->has('image')) { |
127 | $params['image'] = $request->file('image')->store("flot", 'public'); | 127 | $params['image'] = $request->file('image')->store("flot", 'public'); |
128 | } | 128 | } |
129 | Flot::create($params); | 129 | Flot::create($params); |
130 | $data_flots = Flot::query()->where('employer_id', $request->get('employer_if'))->get(); | 130 | $data_flots = Flot::query()->where('employer_id', $request->get('employer_if'))->get(); |
131 | return redirect()->route('employer.slider_flot')->with('success', 'Новый корабль был добавлен'); | 131 | return redirect()->route('employer.slider_flot')->with('success', 'Новый корабль был добавлен'); |
132 | } | 132 | } |
133 | 133 | ||
134 | public function edit_flot(Flot $Flot, Employer $Employer) { | 134 | public function edit_flot(Flot $Flot, Employer $Employer) { |
135 | return view('employers.edit-flot', compact('Flot', 'Employer')); | 135 | return view('employers.edit-flot', compact('Flot', 'Employer')); |
136 | } | 136 | } |
137 | 137 | ||
138 | public function update_flot(FlotRequest $request, Flot $Flot) { | 138 | public function update_flot(FlotRequest $request, Flot $Flot) { |
139 | $params = $request->all(); | 139 | $params = $request->all(); |
140 | 140 | ||
141 | if ($request->has('image')) { | 141 | if ($request->has('image')) { |
142 | if (!empty($flot->image)) { | 142 | if (!empty($flot->image)) { |
143 | Storage::delete($flot->image); | 143 | Storage::delete($flot->image); |
144 | } | 144 | } |
145 | $params['image'] = $request->file('image')->store("flot", 'public'); | 145 | $params['image'] = $request->file('image')->store("flot", 'public'); |
146 | } else { | 146 | } else { |
147 | if (!empty($flot->image)) $params['image'] = $flot->image; | 147 | if (!empty($flot->image)) $params['image'] = $flot->image; |
148 | } | 148 | } |
149 | 149 | ||
150 | $Flot->update($params); | 150 | $Flot->update($params); |
151 | return redirect()->route('employer.slider_flot')->with('success', 'Новый корабль был добавлен'); | 151 | return redirect()->route('employer.slider_flot')->with('success', 'Новый корабль был добавлен'); |
152 | } | 152 | } |
153 | 153 | ||
154 | public function delete_flot(Flot $Flot) { | 154 | public function delete_flot(Flot $Flot) { |
155 | $data_flots = Flot::query()->where('employer_id', $Flot->employer_id)->get(); | 155 | $data_flots = Flot::query()->where('employer_id', $Flot->employer_id)->get(); |
156 | 156 | ||
157 | if (isset($Flot->id)) $Flot->delete(); | 157 | if (isset($Flot->id)) $Flot->delete(); |
158 | return redirect()->route('employer.slider_flot')->with('success', 'Корабль был удален'); | 158 | return redirect()->route('employer.slider_flot')->with('success', 'Корабль был удален'); |
159 | } | 159 | } |
160 | 160 | ||
161 | // Форма добавления вакансий | 161 | // Форма добавления вакансий |
162 | public function cabinet_vacancie() { | 162 | public function cabinet_vacancie() { |
163 | $id = Auth()->user()->id; | 163 | $id = Auth()->user()->id; |
164 | 164 | ||
165 | if (Auth()->user()->is_public) { | 165 | if (Auth()->user()->is_public) { |
166 | $categories = Category::query()->active()->get(); | 166 | $categories = Category::query()->active()->get(); |
167 | $jobs = Job_title::query()->orderByDesc('sort')->OrderBy('name')-> | 167 | $jobs = Job_title::query()->orderByDesc('sort')->OrderBy('name')-> |
168 | where('is_remove', '=', '0')-> | 168 | where('is_remove', '=', '0')-> |
169 | where('is_bd', '=', '0')-> | 169 | where('is_bd', '=', '0')-> |
170 | get(); | 170 | get(); |
171 | $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> | 171 | $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> |
172 | WhereHas('users', | 172 | WhereHas('users', |
173 | function (Builder $query) use ($id) { | 173 | function (Builder $query) use ($id) { |
174 | $query->Where('id', $id); | 174 | $query->Where('id', $id); |
175 | })->get(); | 175 | })->get(); |
176 | return view('employers.add_vacancy', compact('Employer', 'jobs', 'categories')); | 176 | return view('employers.add_vacancy', compact('Employer', 'jobs', 'categories')); |
177 | } else { | 177 | } else { |
178 | return redirect()->route('employer.cabinet_vacancie_danger'); | 178 | return redirect()->route('employer.cabinet_vacancie_danger'); |
179 | } | 179 | } |
180 | } | 180 | } |
181 | 181 | ||
182 | // Форма предупреждения об оплате | 182 | // Форма предупреждения об оплате |
183 | public function cabinet_vacancie_danger() { | 183 | public function cabinet_vacancie_danger() { |
184 | return view('employers.add_vacancy_danger'); | 184 | return view('employers.add_vacancy_danger'); |
185 | } | 185 | } |
186 | 186 | ||
187 | // Сохранение вакансии | 187 | // Сохранение вакансии |
188 | public function cabinet_vacancy_save1(VacancyRequestEdit $request) { | 188 | public function cabinet_vacancy_save1(VacancyRequestEdit $request) { |
189 | $params_emp = $request->all(); | 189 | $params_emp = $request->all(); |
190 | 190 | ||
191 | $params_job["job_title_id"] = $params_emp['job_title_id']; | 191 | $params_job["job_title_id"] = $params_emp['job_title_id']; |
192 | //$params_job["min_salary"] = $params_emp['min_salary']; | 192 | //$params_job["min_salary"] = $params_emp['min_salary']; |
193 | //$params_job["max_salary"] = $params_emp['max_salary']; | 193 | //$params_job["max_salary"] = $params_emp['max_salary']; |
194 | //$params_job["region"] = $params_emp['region']; | 194 | //$params_job["region"] = $params_emp['region']; |
195 | //$params_job["power"] = $params_emp['power']; | 195 | //$params_job["power"] = $params_emp['power']; |
196 | //$params_job["sytki"] = $params_emp['sytki']; | 196 | //$params_job["sytki"] = $params_emp['sytki']; |
197 | //$params_job["start"] = $params_emp['start']; | 197 | //$params_job["start"] = $params_emp['start']; |
198 | //$params_job["flot"] = $params_emp['flot']; | 198 | //$params_job["flot"] = $params_emp['flot']; |
199 | //$params_job["description"] = $params_emp['description']; | 199 | //$params_job["description"] = $params_emp['description']; |
200 | 200 | ||
201 | $ad_jobs = Ad_employer::create($params_emp); | 201 | $ad_jobs = Ad_employer::create($params_emp); |
202 | //$params_job['ad_employer_id'] = $ad_jobs->id; | 202 | //$params_job['ad_employer_id'] = $ad_jobs->id; |
203 | //Ad_jobs::create($params_job); | 203 | //Ad_jobs::create($params_job); |
204 | $ad_jobs->jobs()->sync($request->get('job_title_id')); | 204 | $ad_jobs->jobs()->sync($request->get('job_title_id')); |
205 | 205 | ||
206 | return redirect()->route('employer.vacancy_list'); | 206 | return redirect()->route('employer.vacancy_list'); |
207 | } | 207 | } |
208 | 208 | ||
209 | // Список вакансий | 209 | // Список вакансий |
210 | public function vacancy_list(Request $request) { | 210 | public function vacancy_list(Request $request) { |
211 | $id = Auth()->user()->id; | 211 | $id = Auth()->user()->id; |
212 | 212 | ||
213 | //dd($request->all()); | 213 | //dd($request->all()); |
214 | $Employer = Employer::query()->where('user_id', $id)->first(); | 214 | $Employer = Employer::query()->where('user_id', $id)->first(); |
215 | $vacancy_list = Ad_employer::query()->with('jobs')-> | 215 | $vacancy_list = Ad_employer::query()->with('jobs')-> |
216 | with('jobs_code')-> | 216 | with('jobs_code')-> |
217 | where('employer_id', $Employer->id); | 217 | where('employer_id', $Employer->id); |
218 | 218 | ||
219 | if (($request->has('search')) && (!empty($request->get('search')))) { | 219 | if (($request->has('search')) && (!empty($request->get('search')))) { |
220 | $search = $request->get('search'); | 220 | $search = $request->get('search'); |
221 | $vacancy_list = $vacancy_list->where('name', 'LIKE', "%$search%"); | 221 | $vacancy_list = $vacancy_list->where('name', 'LIKE', "%$search%"); |
222 | } | 222 | } |
223 | 223 | ||
224 | if ($request->get('sort')) { | 224 | if ($request->get('sort')) { |
225 | $sort = $request->get('sort'); | 225 | $sort = $request->get('sort'); |
226 | switch ($sort) { | 226 | switch ($sort) { |
227 | case 'name_up': $vacancy_list = $vacancy_list->orderBy('name')->orderBy('id'); break; | 227 | case 'name_up': $vacancy_list = $vacancy_list->orderBy('name')->orderBy('id'); break; |
228 | case 'name_down': $vacancy_list = $vacancy_list->orderByDesc('name')->orderby('id'); break; | 228 | case 'name_down': $vacancy_list = $vacancy_list->orderByDesc('name')->orderby('id'); break; |
229 | case 'nopublic': $vacancy_list = $vacancy_list->OrderBy('active_is')->orderBy('id'); break; | ||
230 | case 'public': $vacancy_list = $vacancy_list->OrderByDesc('active_is')->orderBy('id'); break; | ||
229 | case 'created_at_up': $vacancy_list = $vacancy_list->OrderBy('created_at')->orderBy('id'); break; | 231 | case 'created_at_up': $vacancy_list = $vacancy_list->OrderBy('created_at')->orderBy('id'); break; |
230 | case 'created_at_down': $vacancy_list = $vacancy_list->orderByDesc('created_at')->orderBy('id'); break; | 232 | case 'created_at_down': $vacancy_list = $vacancy_list->orderByDesc('created_at')->orderBy('id'); break; |
231 | case 'default': $vacancy_list = $vacancy_list->orderBy('id')->orderby('updated_at'); break; | 233 | case 'default': $vacancy_list = $vacancy_list->orderbyDesc('updated_at')->orderBy('name'); break; |
232 | default: $vacancy_list = $vacancy_list->orderBy('id')->orderby('updated_at'); break; | 234 | default: $vacancy_list = $vacancy_list->orderByDesc('id')->orderbyDesc('updated_at'); break; |
233 | } | 235 | } |
234 | } | 236 | } |
235 | $vacancy_list = $vacancy_list->paginate(4); | 237 | $vacancy_list = $vacancy_list->paginate(4); |
236 | 238 | ||
237 | //ajax | 239 | //ajax |
238 | if ($request->ajax()) { | 240 | if ($request->ajax()) { |
239 | return view('employers.ajax.list_vacancy', compact('vacancy_list', 'Employer')); | 241 | return view('employers.ajax.list_vacancy', compact('vacancy_list', 'Employer')); |
240 | } else { | 242 | } else { |
241 | return view('employers.list_vacancy', compact('vacancy_list', 'Employer')); | 243 | return view('employers.list_vacancy', compact('vacancy_list', 'Employer')); |
242 | } | 244 | } |
243 | } | 245 | } |
244 | 246 | ||
245 | // Карточка вакансии | 247 | // Карточка вакансии |
246 | public function vacancy_edit(Ad_employer $ad_employer) { | 248 | public function vacancy_edit(Ad_employer $ad_employer) { |
247 | $id = Auth()->user()->id; | 249 | $id = Auth()->user()->id; |
248 | $Positions = Category::query()->where('is_remove', '=', '0')->get(); | 250 | $Positions = Category::query()->where('is_remove', '=', '0')->get(); |
249 | $jobs = Job_title::query()->orderByDesc('sort')->OrderBy('name')-> | 251 | $jobs = Job_title::query()->orderByDesc('sort')->OrderBy('name')-> |
250 | where('is_remove', '=', '0')-> | 252 | where('is_remove', '=', '0')-> |
251 | where('is_bd', '=', '0')->get(); | 253 | where('is_bd', '=', '0')->get(); |
252 | 254 | ||
253 | $Employer = Employer::query()->with('users')->with('ads')-> | 255 | $Employer = Employer::query()->with('users')->with('ads')-> |
254 | with('flots')->where('user_id', $id)->first(); | 256 | with('flots')->where('user_id', $id)->first(); |
255 | return view('employers.edit_vacancy', compact('ad_employer', 'Positions','Employer', 'jobs')); | 257 | return view('employers.edit_vacancy', compact('ad_employer', 'Positions','Employer', 'jobs')); |
256 | } | 258 | } |
257 | 259 | ||
258 | // Сохранение-редактирование записи | 260 | // Сохранение-редактирование записи |
259 | public function vacancy_save_me(VacancyRequestEdit $request, Ad_employer $ad_employer) { | 261 | public function vacancy_save_me(VacancyRequestEdit $request, Ad_employer $ad_employer) { |
260 | $params = $request->all(); | 262 | $params = $request->all(); |
261 | $params_job["job_title_id"] = $params['job_title_id']; | 263 | $params_job["job_title_id"] = $params['job_title_id']; |
262 | 264 | ||
263 | //$jobs['flot'] = $params['flot']; | 265 | //$jobs['flot'] = $params['flot']; |
264 | //$jobs['job_title_id'] = $params['job_title_id']; | 266 | //$jobs['job_title_id'] = $params['job_title_id']; |
265 | //$titles['position_id'] = $params['position_id']; | 267 | //$titles['position_id'] = $params['position_id']; |
266 | //unset($params['job_title_id']); | 268 | //unset($params['job_title_id']); |
267 | //dd($params); | 269 | //dd($params); |
268 | $ad_employer->update($params); | 270 | $ad_employer->update($params); |
269 | $ad_employer->jobs()->sync($request->get('job_title_id')); | 271 | $ad_employer->jobs()->sync($request->get('job_title_id')); |
270 | 272 | ||
271 | //$job_ = Ad_jobs::query()->where('job_title_id', $jobs['job_title_id'])-> | 273 | //$job_ = Ad_jobs::query()->where('job_title_id', $jobs['job_title_id'])-> |
272 | // where('ad_employer_id', $ad_employer->id)->first(); | 274 | // where('ad_employer_id', $ad_employer->id)->first(); |
273 | //$data = Ad_jobs::find($job_->id); | 275 | //$data = Ad_jobs::find($job_->id); |
274 | //$ad_jobs = $data->update($jobs); | 276 | //$ad_jobs = $data->update($jobs); |
275 | 277 | ||
276 | return redirect()->route('employer.vacancy_list'); | 278 | return redirect()->route('employer.vacancy_list'); |
277 | } | 279 | } |
278 | 280 | ||
279 | // Сохранение карточки вакансии | 281 | // Сохранение карточки вакансии |
280 | public function vacancy_save(Request $request, Ad_employer $ad_employer) { | 282 | public function vacancy_save(Request $request, Ad_employer $ad_employer) { |
281 | $all = $request->all(); | 283 | $all = $request->all(); |
282 | $ad_employer->update($all); | 284 | $ad_employer->update($all); |
283 | return redirect()->route('employer.cabinet_vacancie'); | 285 | return redirect()->route('employer.cabinet_vacancie'); |
284 | } | 286 | } |
285 | 287 | ||
286 | // Удаление карточки вакансии | 288 | // Удаление карточки вакансии |
287 | public function vacancy_delete(Ad_employer $ad_employer) { | 289 | public function vacancy_delete(Ad_employer $ad_employer) { |
288 | $ad_employer->delete(); | 290 | $ad_employer->delete(); |
289 | 291 | ||
290 | return redirect()->route('employer.vacancy_list') | 292 | return redirect()->route('employer.vacancy_list') |
291 | ->with('success', 'Данные были успешно сохранены'); | 293 | ->with('success', 'Данные были успешно сохранены'); |
292 | } | 294 | } |
293 | 295 | ||
294 | // Обновление даты | 296 | // Обновление даты |
295 | public function vacancy_up(Ad_employer $ad_employer) { | 297 | public function vacancy_up(Ad_employer $ad_employer) { |
296 | $up = date('m/d/Y h:i:s', time());; | 298 | $up = date('m/d/Y h:i:s', time());; |
297 | $vac_emp = Ad_employer::findOrFail($ad_employer->id); | 299 | $vac_emp = Ad_employer::findOrFail($ad_employer->id); |
298 | $vac_emp->updated_at = $up; | 300 | $vac_emp->updated_at = $up; |
299 | $vac_emp->save(); | 301 | $vac_emp->save(); |
300 | 302 | ||
301 | return redirect()->route('employer.vacancy_list'); | 303 | return redirect()->route('employer.vacancy_list'); |
302 | // начало конца | 304 | // начало конца |
303 | } | 305 | } |
304 | 306 | ||
305 | //Видимость вакансии | 307 | //Видимость вакансии |
306 | public function vacancy_eye(Ad_employer $ad_employer, $status) { | 308 | public function vacancy_eye(Ad_employer $ad_employer, $status) { |
307 | $vac_emp = Ad_employer::findOrFail($ad_employer->id); | 309 | $vac_emp = Ad_employer::findOrFail($ad_employer->id); |
308 | $vac_emp->active_is = $status; | 310 | $vac_emp->active_is = $status; |
309 | $vac_emp->save(); | 311 | $vac_emp->save(); |
310 | 312 | ||
311 | return redirect()->route('employer.vacancy_list'); | 313 | return redirect()->route('employer.vacancy_list'); |
312 | } | 314 | } |
313 | 315 | ||
314 | //Вакансия редактирования (шаблон) | 316 | //Вакансия редактирования (шаблон) |
315 | public function vacancy_update(Ad_employer $id) { | 317 | public function vacancy_update(Ad_employer $id) { |
316 | 318 | ||
317 | } | 319 | } |
318 | 320 | ||
319 | //Отклики на вакансию - лист | 321 | //Отклики на вакансию - лист |
320 | public function answers(Employer $employer, Request $request) { | 322 | public function answers(Employer $employer, Request $request) { |
321 | $user_id = Auth()->user()->id; | 323 | $user_id = Auth()->user()->id; |
322 | $answer = Ad_employer::query()->where('employer_id', $employer->id); | 324 | $answer = Ad_employer::query()->where('employer_id', $employer->id); |
323 | if ($request->has('search')) { | 325 | if ($request->has('search')) { |
324 | $search = trim($request->get('search')); | 326 | $search = trim($request->get('search')); |
325 | if (!empty($search)) $answer = $answer->where('name', 'LIKE', "%$search%"); | 327 | if (!empty($search)) $answer = $answer->where('name', 'LIKE', "%$search%"); |
326 | } | 328 | } |
327 | 329 | ||
328 | $answer = $answer->with('response')->OrderByDESC('id')->get(); | 330 | $answer = $answer->with('response')->OrderByDESC('id')->get(); |
329 | 331 | ||
330 | return view('employers.list_answer', compact('answer', 'user_id', 'employer')); | 332 | return view('employers.list_answer', compact('answer', 'user_id', 'employer')); |
331 | } | 333 | } |
332 | 334 | ||
333 | //Обновление статуса | 335 | //Обновление статуса |
334 | public function supple_status(employer $employer, ad_response $ad_response, $flag) { | 336 | public function supple_status(employer $employer, ad_response $ad_response, $flag) { |
335 | $ad_response->update(Array('flag' => $flag)); | 337 | $ad_response->update(Array('flag' => $flag)); |
336 | return redirect()->route('employer.answers', ['employer' => $employer->id]); | 338 | return redirect()->route('employer.answers', ['employer' => $employer->id]); |
337 | } | 339 | } |
338 | 340 | ||
339 | //Страницы сообщений список | 341 | //Страницы сообщений список |
340 | public function messages($type_message) { | 342 | public function messages($type_message) { |
341 | $user_id = Auth()->user()->id; | 343 | $user_id = Auth()->user()->id; |
342 | 344 | ||
343 | $messages_input = Message::query()->with('vacancies')->with('user_from')-> | 345 | $messages_input = Message::query()->with('vacancies')->with('user_from')-> |
344 | Where('to_user_id', $user_id)->OrderByDesc('created_at'); | 346 | Where('to_user_id', $user_id)->OrderByDesc('created_at'); |
345 | 347 | ||
346 | $messages_output = Message::query()->with('vacancies')-> | 348 | $messages_output = Message::query()->with('vacancies')-> |
347 | with('user_to')->where('user_id', $user_id)-> | 349 | with('user_to')->where('user_id', $user_id)-> |
348 | OrderByDesc('created_at'); | 350 | OrderByDesc('created_at'); |
349 | 351 | ||
350 | $count_input = $messages_input->count(); | 352 | $count_input = $messages_input->count(); |
351 | $count_output = $messages_output->count(); | 353 | $count_output = $messages_output->count(); |
352 | 354 | ||
353 | if ($type_message == 'input') { | 355 | if ($type_message == 'input') { |
354 | $messages = $messages_input->paginate(5); | 356 | $messages = $messages_input->paginate(5); |
355 | } | 357 | } |
356 | 358 | ||
357 | if ($type_message == 'output') { | 359 | if ($type_message == 'output') { |
358 | $messages = $messages_output->paginate(5); | 360 | $messages = $messages_output->paginate(5); |
359 | } | 361 | } |
360 | 362 | ||
361 | //dd($user_id, $messages[2]->vacancies); | 363 | //dd($user_id, $messages[2]->vacancies); |
362 | //jobs); | 364 | //jobs); |
363 | 365 | ||
364 | return view('employers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id')); | 366 | return view('employers.messages', compact('messages', 'count_input', 'count_output', 'type_message', 'user_id')); |
365 | } | 367 | } |
366 | 368 | ||
367 | // Диалог между пользователями | 369 | // Диалог между пользователями |
368 | public function dialog(Request $request, User_Model $user1, User_Model $user2) { | 370 | public function dialog(Request $request, User_Model $user1, User_Model $user2) { |
369 | // Получение параметров. | 371 | // Получение параметров. |
370 | if ($request->has('ad_employer')){ | 372 | if ($request->has('ad_employer')){ |
371 | $ad_employer = $request->get('ad_employer'); | 373 | $ad_employer = $request->get('ad_employer'); |
372 | } else { | 374 | } else { |
373 | $ad_employer = 0; | 375 | $ad_employer = 0; |
374 | } | 376 | } |
375 | 377 | ||
376 | if (isset($user2->id)) { | 378 | if (isset($user2->id)) { |
377 | $companion = User_Model::query()->with('workers')-> | 379 | $companion = User_Model::query()->with('workers')-> |
378 | with('employers')-> | 380 | with('employers')-> |
379 | where('id', $user2->id)->first(); | 381 | where('id', $user2->id)->first(); |
380 | } | 382 | } |
381 | 383 | ||
382 | $Messages = Message::query()-> | 384 | $Messages = Message::query()-> |
383 | where('ad_employer_id', '=', $ad_employer)-> | 385 | where('ad_employer_id', '=', $ad_employer)-> |
384 | where(function($query) use ($user1, $user2) { | 386 | where(function($query) use ($user1, $user2) { |
385 | $query->where('user_id', $user1->id)->where('to_user_id', $user2->id); | 387 | $query->where('user_id', $user1->id)->where('to_user_id', $user2->id); |
386 | })->orWhere(function($query) use ($user1, $user2) { | 388 | })->orWhere(function($query) use ($user1, $user2) { |
387 | $query->where('user_id', $user2->id)->where('to_user_id', $user1->id); | 389 | $query->where('user_id', $user2->id)->where('to_user_id', $user1->id); |
388 | })->where('ad_employer_id', '=', $ad_employer)->OrderBy('created_at')->get(); | 390 | })->where('ad_employer_id', '=', $ad_employer)->OrderBy('created_at')->get(); |
389 | 391 | ||
390 | $id_vac = $Messages[$Messages->count() - 1]->ad_employer_id; | 392 | $id_vac = $Messages[$Messages->count() - 1]->ad_employer_id; |
391 | 393 | ||
392 | //$ad_employer = null; | 394 | //$ad_employer = null; |
393 | //if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first(); | 395 | //if (!is_null($id_vac)) $ad_employer = Ad_employer::query()->where('id', $id_vac)->first(); |
394 | $sender = $user1; | 396 | $sender = $user1; |
395 | 397 | ||
396 | return view('employers.dialog', compact('companion', 'sender', 'ad_employer', 'Messages')); | 398 | return view('employers.dialog', compact('companion', 'sender', 'ad_employer', 'Messages')); |
397 | } | 399 | } |
398 | 400 | ||
399 | // Регистрация работодателя | 401 | // Регистрация работодателя |
400 | public function register_employer(Request $request) { | 402 | public function register_employer(Request $request) { |
401 | $params = $request->all(); | 403 | $params = $request->all(); |
402 | 404 | ||
403 | $rules = [ | 405 | $rules = [ |
404 | //'surname' => ['required', 'string', 'max:255'], | 406 | //'surname' => ['required', 'string', 'max:255'], |
405 | //'name_man' => ['required', 'string', 'max:255'], | 407 | //'name_man' => ['required', 'string', 'max:255'], |
406 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], | 408 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], |
407 | 'name_company' => ['required', 'string', 'max:255'], | 409 | 'name_company' => ['required', 'string', 'max:255'], |
408 | 'password' => ['required', 'string', 'min:6'], | 410 | 'password' => ['required', 'string', 'min:6'], |
409 | ]; | 411 | ]; |
410 | 412 | ||
411 | 413 | ||
412 | $messages = [ | 414 | $messages = [ |
413 | 'required' => 'Укажите обязательное поле', | 415 | 'required' => 'Укажите обязательное поле', |
414 | 'min' => [ | 416 | 'min' => [ |
415 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 417 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
416 | 'integer' => 'Поле «:attribute» должно быть :min или больше', | 418 | 'integer' => 'Поле «:attribute» должно быть :min или больше', |
417 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 419 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
418 | ], | 420 | ], |
419 | 'max' => [ | 421 | 'max' => [ |
420 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 422 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
421 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', | 423 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', |
422 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 424 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
423 | ] | 425 | ] |
424 | ]; | 426 | ]; |
425 | 427 | ||
426 | $email = $request->get('email'); | 428 | $email = $request->get('email'); |
427 | if (!preg_match("/^[a-zA-Z0-9_\-.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-.]+$/", $email)) { | 429 | if (!preg_match("/^[a-zA-Z0-9_\-.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-.]+$/", $email)) { |
428 | return json_encode(Array("ERROR" => "Error: Отсутствует емайл или некорректный емайл")); | 430 | return json_encode(Array("ERROR" => "Error: Отсутствует емайл или некорректный емайл")); |
429 | } | 431 | } |
430 | 432 | ||
431 | if ($request->get('password') !== $request->get('confirmed')){ | 433 | if ($request->get('password') !== $request->get('confirmed')){ |
432 | return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); | 434 | return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); |
433 | } | 435 | } |
434 | 436 | ||
435 | if (strlen($request->get('password')) < 6) { | 437 | if (strlen($request->get('password')) < 6) { |
436 | return json_encode(Array("ERROR" => "Error: Недостаточная длина пароля! Увеличьте себе длину пароля!")); | 438 | return json_encode(Array("ERROR" => "Error: Недостаточная длина пароля! Увеличьте себе длину пароля!")); |
437 | } | 439 | } |
438 | /* | 440 | /* |
439 | $specsumbol = Array('!','~', '#', '$', '%', '^', '&', '*', '(', ')', '-', '=', ';', ':', '<', '>', '?'); | 441 | $specsumbol = Array('!','~', '#', '$', '%', '^', '&', '*', '(', ')', '-', '=', ';', ':', '<', '>', '?'); |
440 | $alpha = Array('Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'Z', | 442 | $alpha = Array('Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'Z', |
441 | 'X', 'C', 'V', 'B', 'N', 'M'); | 443 | 'X', 'C', 'V', 'B', 'N', 'M'); |
442 | $spec_bool = false; | 444 | $spec_bool = false; |
443 | $alpha_bool = false; | 445 | $alpha_bool = false; |
444 | 446 | ||
445 | $haystack = $request->get('password'); | 447 | $haystack = $request->get('password'); |
446 | 448 | ||
447 | foreach ($specsumbol as $it) { | 449 | foreach ($specsumbol as $it) { |
448 | if (strpos($haystack, $it) !== false) { | 450 | if (strpos($haystack, $it) !== false) { |
449 | $spec_bool = true; | 451 | $spec_bool = true; |
450 | } | 452 | } |
451 | } | 453 | } |
452 | 454 | ||
453 | foreach ($alpha as $it) { | 455 | foreach ($alpha as $it) { |
454 | if (strpos($haystack, $it) !== false) { | 456 | if (strpos($haystack, $it) !== false) { |
455 | $alpha_bool = true; | 457 | $alpha_bool = true; |
456 | } | 458 | } |
457 | } | 459 | } |
458 | 460 | ||
459 | if ((!$spec_bool) || (!$alpha_bool)) { | 461 | if ((!$spec_bool) || (!$alpha_bool)) { |
460 | return json_encode(Array("ERROR" => "Error: Нет спецсимволов в пароле, латинские буквы заглавные, а также один из символов: !~#$%^&*()-=;,:<>?")); | 462 | return json_encode(Array("ERROR" => "Error: Нет спецсимволов в пароле, латинские буквы заглавные, а также один из символов: !~#$%^&*()-=;,:<>?")); |
461 | }*/ | 463 | }*/ |
462 | 464 | ||
463 | if (empty($request->get('surname'))) { | 465 | if (empty($request->get('surname'))) { |
464 | $params['surname'] = 'Неизвестно'; | 466 | $params['surname'] = 'Неизвестно'; |
465 | } | 467 | } |
466 | if (empty($request->get('name_man'))) { | 468 | if (empty($request->get('name_man'))) { |
467 | $params['name_man'] = 'Неизвестно'; | 469 | $params['name_man'] = 'Неизвестно'; |
468 | } | 470 | } |
469 | $validator = Validator::make($params, $rules, $messages); | 471 | $validator = Validator::make($params, $rules, $messages); |
470 | 472 | ||
471 | if ($validator->fails()) { | 473 | if ($validator->fails()) { |
472 | return json_encode(Array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); | 474 | return json_encode(Array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); |
473 | } else { | 475 | } else { |
474 | $user = $this->create($params); | 476 | $user = $this->create($params); |
475 | event(new Registered($user)); | 477 | event(new Registered($user)); |
476 | Auth::guard()->login($user); | 478 | Auth::guard()->login($user); |
477 | } | 479 | } |
478 | 480 | ||
479 | if ($user) { | 481 | if ($user) { |
480 | return json_encode(Array("REDIRECT" => redirect()->route('employer.cabinet')->getTargetUrl()));; | 482 | return json_encode(Array("REDIRECT" => redirect()->route('employer.cabinet')->getTargetUrl()));; |
481 | } else { | 483 | } else { |
482 | return json_encode(Array("ERROR" => "Error2: Данные были утеряны!")); | 484 | return json_encode(Array("ERROR" => "Error2: Данные были утеряны!")); |
483 | } | 485 | } |
484 | } | 486 | } |
485 | 487 | ||
486 | // Создание пользователя | 488 | // Создание пользователя |
487 | protected function create(array $data) | 489 | protected function create(array $data) |
488 | { | 490 | { |
489 | $Use = new User_Model(); | 491 | $Use = new User_Model(); |
490 | $Code_user = $Use->create([ | 492 | $Code_user = $Use->create([ |
491 | 'name' => $data['surname']." ".$data['name_man'], | 493 | 'name' => $data['surname']." ".$data['name_man'], |
492 | 'name_man' => $data['name_man'], | 494 | 'name_man' => $data['name_man'], |
493 | 'surname' => $data['surname'], | 495 | 'surname' => $data['surname'], |
494 | 'surname2' => $data['surname2'], | 496 | 'surname2' => $data['surname2'], |
495 | 'subscribe_email' => $data['email'], | 497 | 'subscribe_email' => $data['email'], |
496 | 'email' => $data['email'], | 498 | 'email' => $data['email'], |
497 | 'telephone' => $data['telephone'], | 499 | 'telephone' => $data['telephone'], |
498 | 'is_worker' => 0, | 500 | 'is_worker' => 0, |
499 | 'password' => Hash::make($data['password']), | 501 | 'password' => Hash::make($data['password']), |
500 | 'pubpassword' => base64_encode($data['password']), | 502 | 'pubpassword' => base64_encode($data['password']), |
501 | 'email_verified_at' => Carbon::now() | 503 | 'email_verified_at' => Carbon::now() |
502 | ]); | 504 | ]); |
503 | 505 | ||
504 | if ($Code_user->id > 0) { | 506 | if ($Code_user->id > 0) { |
505 | $Employer = new Employer(); | 507 | $Employer = new Employer(); |
506 | $Employer->user_id = $Code_user->id; | 508 | $Employer->user_id = $Code_user->id; |
507 | $Employer->name_company = $data['name_company']; | 509 | $Employer->name_company = $data['name_company']; |
508 | $Employer->email = $data['email']; | 510 | $Employer->email = $data['email']; |
509 | $Employer->telephone = $data['telephone']; | 511 | $Employer->telephone = $data['telephone']; |
510 | $Employer->code = Tools::generator_id(10); | 512 | $Employer->code = Tools::generator_id(10); |
511 | $Employer->save(); | 513 | $Employer->save(); |
512 | 514 | ||
513 | return $Code_user; | 515 | return $Code_user; |
514 | } | 516 | } |
515 | } | 517 | } |
516 | 518 | ||
517 | // Отправка сообщения от работодателя | 519 | // Отправка сообщения от работодателя |
518 | public function send_message(MessagesRequiest $request) { | 520 | public function send_message(MessagesRequiest $request) { |
519 | $params = $request->all(); | 521 | $params = $request->all(); |
520 | dd($params); | 522 | dd($params); |
521 | $user1 = $params['user_id']; | 523 | $user1 = $params['user_id']; |
522 | $user2 = $params['to_user_id']; | 524 | $user2 = $params['to_user_id']; |
523 | 525 | ||
524 | if ($request->has('file')) { | 526 | if ($request->has('file')) { |
525 | $params['file'] = $request->file('file')->store("messages", 'public'); | 527 | $params['file'] = $request->file('file')->store("messages", 'public'); |
526 | } | 528 | } |
527 | Message::create($params); | 529 | Message::create($params); |
528 | return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]); | 530 | return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]); |
529 | } | 531 | } |
530 | 532 | ||
531 | public function test123(Request $request) { | 533 | public function test123(Request $request) { |
532 | $params = $request->all(); | 534 | $params = $request->all(); |
533 | $user1 = $params['user_id']; | 535 | $user1 = $params['user_id']; |
534 | $user2 = $params['to_user_id']; | 536 | $user2 = $params['to_user_id']; |
535 | $id_vacancy = $params['ad_employer_id']; | 537 | $id_vacancy = $params['ad_employer_id']; |
536 | $ad_name = $params['ad_name']; | 538 | $ad_name = $params['ad_name']; |
537 | 539 | ||
538 | $rules = [ | 540 | $rules = [ |
539 | 'text' => 'required|min:1|max:150000', | 541 | 'text' => 'required|min:1|max:150000', |
540 | 'file' => 'file|mimes:doc,docx,xlsx,csv,txt,xlx,xls,pdf|max:150000' | 542 | 'file' => 'file|mimes:doc,docx,xlsx,csv,txt,xlx,xls,pdf|max:150000' |
541 | ]; | 543 | ]; |
542 | $messages = [ | 544 | $messages = [ |
543 | 'required' => 'Укажите обязательное поле', | 545 | 'required' => 'Укажите обязательное поле', |
544 | 'min' => [ | 546 | 'min' => [ |
545 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', | 547 | 'string' => 'Поле «:attribute» должно быть не меньше :min символов', |
546 | 'integer' => 'Поле «:attribute» должно быть :min или больше', | 548 | 'integer' => 'Поле «:attribute» должно быть :min или больше', |
547 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' | 549 | 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' |
548 | ], | 550 | ], |
549 | 'max' => [ | 551 | 'max' => [ |
550 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', | 552 | 'string' => 'Поле «:attribute» должно быть не больше :max символов', |
551 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', | 553 | 'integer' => 'Поле «:attribute» должно быть :max или меньше', |
552 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' | 554 | 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' |
553 | ] | 555 | ] |
554 | ]; | 556 | ]; |
555 | 557 | ||
556 | $validator = Validator::make($request->all(), $rules, $messages); | 558 | $validator = Validator::make($request->all(), $rules, $messages); |
557 | 559 | ||
558 | if ($validator->fails()) { | 560 | if ($validator->fails()) { |
559 | return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]) | 561 | return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]) |
560 | ->withErrors($validator); | 562 | ->withErrors($validator); |
561 | } else { | 563 | } else { |
562 | if ($request->has('file')) { | 564 | if ($request->has('file')) { |
563 | $params['file'] = $request->file('file')->store("messages", 'public'); | 565 | $params['file'] = $request->file('file')->store("messages", 'public'); |
564 | } | 566 | } |
565 | Message::create($params); | 567 | Message::create($params); |
566 | //return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]); | 568 | //return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]); |
567 | return redirect()->route('employer.dialog', | 569 | return redirect()->route('employer.dialog', |
568 | ['user1' => $user1, 'user2' => $user2, 'ad_employer' => $id_vacancy, 'ad_name' => $ad_name]); | 570 | ['user1' => $user1, 'user2' => $user2, 'ad_employer' => $id_vacancy, 'ad_name' => $ad_name]); |
569 | 571 | ||
570 | } | 572 | } |
571 | } | 573 | } |
572 | 574 | ||
573 | //Избранные люди | 575 | //Избранные люди |
574 | public function favorites(Request $request) { | 576 | public function favorites(Request $request) { |
575 | $IP_address = RusDate::ip_addr_client(); | 577 | $IP_address = RusDate::ip_addr_client(); |
576 | $Arr = Like_worker::Query()->select('code_record')->where('ip_address', '=', $IP_address)->get(); | 578 | $Arr = Like_worker::Query()->select('code_record')->where('ip_address', '=', $IP_address)->get(); |
577 | 579 | ||
578 | if ($Arr->count()) { | 580 | if ($Arr->count()) { |
579 | $A = Array(); | 581 | $A = Array(); |
580 | foreach ($Arr as $it) { | 582 | foreach ($Arr as $it) { |
581 | $A[] = $it->code_record; | 583 | $A[] = $it->code_record; |
582 | } | 584 | } |
583 | 585 | ||
584 | $Workers = Worker::query()->whereIn('id', $A); | 586 | $Workers = Worker::query()->whereIn('id', $A); |
585 | } else { | 587 | } else { |
586 | $Workers = Worker::query()->where('id', '=', '0'); | 588 | $Workers = Worker::query()->where('id', '=', '0'); |
587 | } | 589 | } |
588 | 590 | ||
589 | if (($request->has('search')) && (!empty($request->get('search')))) { | 591 | if (($request->has('search')) && (!empty($request->get('search')))) { |
590 | $search = $request->get('search'); | 592 | $search = $request->get('search'); |
591 | 593 | ||
592 | $Workers = $Workers->WhereHas('users', | 594 | $Workers = $Workers->WhereHas('users', |
593 | function (Builder $query) use ($search) { | 595 | function (Builder $query) use ($search) { |
594 | $query->Where('surname', 'LIKE', "%$search%") | 596 | $query->Where('surname', 'LIKE', "%$search%") |
595 | ->orWhere('name_man', 'LIKE', "%$search%") | 597 | ->orWhere('name_man', 'LIKE', "%$search%") |
596 | ->orWhere('surname2', 'LIKE', "%$search%"); | 598 | ->orWhere('surname2', 'LIKE', "%$search%"); |
597 | }); | 599 | }); |
598 | } else { | 600 | } else { |
599 | $Workers = $Workers->with('users'); | 601 | $Workers = $Workers->with('users'); |
600 | } | 602 | } |
601 | 603 | ||
602 | $Workers = $Workers->get(); | 604 | $Workers = $Workers->get(); |
603 | 605 | ||
604 | 606 | ||
605 | return view('employers.favorite', compact('Workers')); | 607 | return view('employers.favorite', compact('Workers')); |
606 | } | 608 | } |
607 | 609 | ||
608 | // База данных | 610 | // База данных |
609 | public function bd(Request $request) { | 611 | public function bd(Request $request) { |
610 | // для типа BelongsTo | 612 | // для типа BelongsTo |
611 | //$documents = Document::query()->orderBy(Location::select('name') | 613 | //$documents = Document::query()->orderBy(Location::select('name') |
612 | // ->whereColumn('locations.id', 'documents.location_id') | 614 | // ->whereColumn('locations.id', 'documents.location_id') |
613 | //); | 615 | //); |
614 | 616 | ||
615 | // для типа HasOne/Many | 617 | // для типа HasOne/Many |
616 | // $documents = Document::::query()->orderBy(Location::select('name') | 618 | // $documents = Document::::query()->orderBy(Location::select('name') |
617 | // ->whereColumn('locations.document_id', 'documents.id') | 619 | // ->whereColumn('locations.document_id', 'documents.id') |
618 | //); | 620 | //); |
619 | 621 | ||
620 | 622 | ||
621 | $users = User_Model::query()->with('workers'); | 623 | $users = User_Model::query()->with('workers'); |
622 | 624 | ||
623 | if ($request->has('search')) { | 625 | if ($request->has('search')) { |
624 | $find_key = $request->get('search'); | 626 | $find_key = $request->get('search'); |
625 | $users = $users->where('name', 'LIKE', "%$find_key%") | 627 | $users = $users->where('name', 'LIKE', "%$find_key%") |
626 | ->orWhere('surname', 'LIKE', "%$find_key%") | 628 | ->orWhere('surname', 'LIKE', "%$find_key%") |
627 | ->orWhere('name_man', 'LIKE', "%$find_key%") | 629 | ->orWhere('name_man', 'LIKE', "%$find_key%") |
628 | ->orWhere('email', 'LIKE', "%$find_key%") | 630 | ->orWhere('email', 'LIKE', "%$find_key%") |
629 | ->orWhere('telephone', 'LIKE', "%$find_key%"); | 631 | ->orWhere('telephone', 'LIKE', "%$find_key%"); |
630 | } | 632 | } |
631 | 633 | ||
632 | // Данные | 634 | // Данные |
633 | $users = $users->Baseuser()-> | 635 | $users = $users->Baseuser()-> |
634 | orderBy(Worker::select('position_work')->whereColumn('Workers.user_id', 'users.id')); | 636 | orderBy(Worker::select('position_work')->whereColumn('Workers.user_id', 'users.id')); |
635 | $count_users = $users; | 637 | $count_users = $users; |
636 | $users = $users->paginate(5); | 638 | $users = $users->paginate(5); |
637 | 639 | ||
638 | 640 | ||
639 | return view('employers.bd', compact('users', 'count_users')); | 641 | return view('employers.bd', compact('users', 'count_users')); |
640 | } | 642 | } |
641 | 643 | ||
642 | //Настройка уведомлений | 644 | //Настройка уведомлений |
643 | public function subscribe() { | 645 | public function subscribe() { |
644 | return view('employers.subcribe'); | 646 | return view('employers.subcribe'); |
645 | } | 647 | } |
646 | 648 | ||
647 | //Установка уведомлений сохранение | 649 | //Установка уведомлений сохранение |
648 | public function save_subscribe(Request $request) { | 650 | public function save_subscribe(Request $request) { |
649 | dd($request->all()); | 651 | dd($request->all()); |
650 | $msg = $request->validate([ | 652 | $msg = $request->validate([ |
651 | 'subscribe_email' => 'required|email|min:5|max:255', | 653 | 'subscribe_email' => 'required|email|min:5|max:255', |
652 | ]); | 654 | ]); |
653 | return redirect()->route('employer.subscribe')->with('Вы успешно подписались на рассылку'); | 655 | return redirect()->route('employer.subscribe')->with('Вы успешно подписались на рассылку'); |
654 | } | 656 | } |
655 | 657 | ||
656 | //Сбросить форму с паролем | 658 | //Сбросить форму с паролем |
657 | public function password_reset() { | 659 | public function password_reset() { |
658 | $email = Auth()->user()->email; | 660 | $email = Auth()->user()->email; |
659 | return view('employers.password-reset', compact('email')); | 661 | return view('employers.password-reset', compact('email')); |
660 | } | 662 | } |
661 | 663 | ||
662 | //Обновление пароля | 664 | //Обновление пароля |
663 | public function new_password(Request $request) { | 665 | public function new_password(Request $request) { |
664 | $use = Auth()->user(); | 666 | $use = Auth()->user(); |
665 | $request->validate([ | 667 | $request->validate([ |
666 | 'password' => 'required|string', | 668 | 'password' => 'required|string', |
667 | 'new_password' => 'required|string', | 669 | 'new_password' => 'required|string', |
668 | 'new_password2' => 'required|string' | 670 | 'new_password2' => 'required|string' |
669 | ]); | 671 | ]); |
670 | 672 | ||
671 | if ($request->get('new_password') == $request->get('new_password2')) | 673 | if ($request->get('new_password') == $request->get('new_password2')) |
672 | if ($request->get('password') !== $request->get('new_password')) { | 674 | if ($request->get('password') !== $request->get('new_password')) { |
673 | $credentials = $request->only('email', 'password'); | 675 | $credentials = $request->only('email', 'password'); |
674 | if (Auth::attempt($credentials)) { | 676 | if (Auth::attempt($credentials)) { |
675 | 677 | ||
676 | if (!is_null($use->email_verified_at)){ | 678 | if (!is_null($use->email_verified_at)){ |
677 | 679 | ||
678 | $user_data = User_Model::find($use->id); | 680 | $user_data = User_Model::find($use->id); |
679 | $user_data->update([ | 681 | $user_data->update([ |
680 | 'password' => Hash::make($request->get('new_password')), | 682 | 'password' => Hash::make($request->get('new_password')), |
681 | 'pubpassword' => base64_encode($request->get('new_password')), | 683 | 'pubpassword' => base64_encode($request->get('new_password')), |
682 | ]); | 684 | ]); |
683 | return redirect() | 685 | return redirect() |
684 | ->route('employer.password_reset') | 686 | ->route('employer.password_reset') |
685 | ->with('success', 'Поздравляю! Вы обновили свой пароль!'); | 687 | ->with('success', 'Поздравляю! Вы обновили свой пароль!'); |
686 | } | 688 | } |
687 | 689 | ||
688 | return redirect() | 690 | return redirect() |
689 | ->route('employer.password_reset') | 691 | ->route('employer.password_reset') |
690 | ->withError('Данная учетная запись не было верифицированна!'); | 692 | ->withError('Данная учетная запись не было верифицированна!'); |
691 | } | 693 | } |
692 | } | 694 | } |
693 | 695 | ||
694 | return redirect() | 696 | return redirect() |
695 | ->route('employer.password_reset') | 697 | ->route('employer.password_reset') |
696 | ->withErrors('Не совпадение данных, обновите пароли!'); | 698 | ->withErrors('Не совпадение данных, обновите пароли!'); |
697 | } | 699 | } |
698 | 700 | ||
699 | 701 | ||
700 | 702 | ||
701 | // Форма Удаление пипла | 703 | // Форма Удаление пипла |
702 | public function delete_people() { | 704 | public function delete_people() { |
703 | $login = Auth()->user()->email; | 705 | $login = Auth()->user()->email; |
704 | return view('employers.delete_people', compact('login')); | 706 | return view('employers.delete_people', compact('login')); |
705 | } | 707 | } |
706 | 708 | ||
707 | // Удаление аккаунта | 709 | // Удаление аккаунта |
708 | public function action_delete_user(Request $request) { | 710 | public function action_delete_user(Request $request) { |
709 | $Answer = $request->all(); | 711 | $Answer = $request->all(); |
710 | $user_id = Auth()->user()->id; | 712 | $user_id = Auth()->user()->id; |
711 | $request->validate([ | 713 | $request->validate([ |
712 | 'password' => 'required|string', | 714 | 'password' => 'required|string', |
713 | ]); | 715 | ]); |
714 | 716 | ||
715 | $credentials = $request->only('email', 'password'); | 717 | $credentials = $request->only('email', 'password'); |
716 | if (Auth::attempt($credentials)) { | 718 | if (Auth::attempt($credentials)) { |
717 | Auth::logout(); | 719 | Auth::logout(); |
718 | $it = User_Model::find($user_id); | 720 | $it = User_Model::find($user_id); |
719 | $it->delete(); | 721 | $it->delete(); |
720 | return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт'); | 722 | return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт'); |
721 | } else { | 723 | } else { |
722 | return redirect()->route('employer.delete_people') | 724 | return redirect()->route('employer.delete_people') |
723 | ->withErrors( 'Неверный пароль! Нужен корректный пароль'); | 725 | ->withErrors( 'Неверный пароль! Нужен корректный пароль'); |
724 | } | 726 | } |
725 | } | 727 | } |
726 | 728 | ||
727 | public function ajax_delete_user(Request $request) { | 729 | public function ajax_delete_user(Request $request) { |
728 | $Answer = $request->all(); | 730 | $Answer = $request->all(); |
729 | $user_id = Auth()->user()->id; | 731 | $user_id = Auth()->user()->id; |
730 | $request->validate([ | 732 | $request->validate([ |
731 | 'password' => 'required|string', | 733 | 'password' => 'required|string', |
732 | ]); | 734 | ]); |
733 | $credentials = $request->only('email', 'password'); | 735 | $credentials = $request->only('email', 'password'); |
734 | if (Auth::attempt($credentials)) { | 736 | if (Auth::attempt($credentials)) { |
735 | 737 | ||
736 | return json_encode(Array('SUCCESS' => 'Вы успешно удалили свой аккаунт', | 738 | return json_encode(Array('SUCCESS' => 'Вы успешно удалили свой аккаунт', |
737 | 'email' => $request->get('email'), | 739 | 'email' => $request->get('email'), |
738 | 'password' => $request->get('password'))); | 740 | 'password' => $request->get('password'))); |
739 | } else { | 741 | } else { |
740 | return json_encode(Array('ERROR' => 'Неверный пароль! Нужен корректный пароль')); | 742 | return json_encode(Array('ERROR' => 'Неверный пароль! Нужен корректный пароль')); |
741 | } | 743 | } |
742 | } | 744 | } |
743 | 745 | ||
744 | // FAQ - Вопросы/ответы для работодателей и соискателей | 746 | // FAQ - Вопросы/ответы для работодателей и соискателей |
745 | public function faq() { | 747 | public function faq() { |
746 | return view('employers.faq'); | 748 | return view('employers.faq'); |
747 | } | 749 | } |
748 | 750 | ||
749 | // Рассылка сообщений | 751 | // Рассылка сообщений |
750 | public function send_all_messages() { | 752 | public function send_all_messages() { |
751 | $id = Auth()->user()->id; | 753 | $id = Auth()->user()->id; |
752 | $sending = Employer::query()->where('user_id', '=', "$id")->first(); | 754 | $sending = Employer::query()->where('user_id', '=', "$id")->first(); |
753 | if ($sending->sending_is) | 755 | if ($sending->sending_is) |
754 | return view('employers.send_all'); | 756 | return view('employers.send_all'); |
755 | else | 757 | else |
756 | return view('employers.send_all_danger'); | 758 | return view('employers.send_all_danger'); |
757 | } | 759 | } |
758 | 760 | ||
759 | // Отправка сообщений для информации | 761 | // Отправка сообщений для информации |
760 | public function send_all_post(Request $request) { | 762 | public function send_all_post(Request $request) { |
761 | $data = $request->all(); | 763 | $data = $request->all(); |
762 | 764 | ||
763 | $emails = User_Model::query()->where('is_worker', '1')->get(); | 765 | $emails = User_Model::query()->where('is_worker', '1')->get(); |
764 | 766 | ||
765 | foreach ($emails as $e) { | 767 | foreach ($emails as $e) { |
766 | Mail::to($e->email)->send(new SendAllMessages($data)); | 768 | Mail::to($e->email)->send(new SendAllMessages($data)); |
767 | } | 769 | } |
768 | 770 | ||
769 | return redirect()->route('employer.send_all_messages')->with('success', 'Письма были отправлены'); | 771 | return redirect()->route('employer.send_all_messages')->with('success', 'Письма были отправлены'); |
770 | } | 772 | } |
771 | 773 | ||
772 | // База резюме | 774 | // База резюме |
773 | public function bd_tupe(Request $request) { | 775 | public function bd_tupe(Request $request) { |
774 | $Resume = User_Model::query()->with('workers')->where('is_bd', '=', '1')->get(); | 776 | $Resume = User_Model::query()->with('workers')->where('is_bd', '=', '1')->get(); |
775 | 777 | ||
776 | return view('employers.bd_tupe', compact('Resume')); | 778 | return view('employers.bd_tupe', compact('Resume')); |
777 | } | 779 | } |
778 | 780 | ||
779 | ////////////////////////////////////////////////////////////////// | 781 | ////////////////////////////////////////////////////////////////// |
780 | // Отправил сообщение | 782 | // Отправил сообщение |
781 | ////////////////////////////////////////////////////////////////// | 783 | ////////////////////////////////////////////////////////////////// |
782 | public function new_message(Request $request) { | 784 | public function new_message(Request $request) { |
783 | $params = $request->all(); | 785 | $params = $request->all(); |
784 | $id = $params['_user_id']; | 786 | $id = $params['_user_id']; |
785 | $message = new Message(); | 787 | $message = new Message(); |
786 | $message->user_id = $params['_user_id']; | 788 | $message->user_id = $params['_user_id']; |
787 | $message->to_user_id = $params['_to_user_id']; | 789 | $message->to_user_id = $params['_to_user_id']; |
788 | $message->title = $params['title']; | 790 | $message->title = $params['title']; |
789 | $message->text = $params['text']; | 791 | $message->text = $params['text']; |
790 | if ($request->has('_file')) { | 792 | if ($request->has('_file')) { |
791 | $message->file = $request->file('_file')->store("worker/$id", 'public'); | 793 | $message->file = $request->file('_file')->store("worker/$id", 'public'); |
792 | } | 794 | } |
793 | $message->ad_employer_id = $params['_vacancy']; | 795 | $message->ad_employer_id = $params['_vacancy']; |
794 | $message->flag_new = 1; | 796 | $message->flag_new = 1; |
795 | $id_message = $message->save(); | 797 | $id_message = $message->save(); |
796 | 798 | ||
797 | //$data['message_id'] = $id_message; | 799 | //$data['message_id'] = $id_message; |
798 | //$data['ad_employer_id'] = $params['_vacancy']; | 800 | //$data['ad_employer_id'] = $params['_vacancy']; |
799 | //$data['job_title_id'] = 0; | 801 | //$data['job_title_id'] = 0; |
800 | 802 | ||
801 | $data['flag'] = 1; | 803 | $data['flag'] = 1; |
802 | //$ad_responce = ad_response::create($data); | 804 | //$ad_responce = ad_response::create($data); |
803 | return redirect()->route('employer.messages', ['type_message' => 'output']); | 805 | return redirect()->route('employer.messages', ['type_message' => 'output']); |
804 | } | 806 | } |
805 | 807 | ||
806 | // Восстановление пароля | 808 | // Восстановление пароля |
807 | public function repair_password(Request $request) { | 809 | public function repair_password(Request $request) { |
808 | $params = $request->get('email'); | 810 | $params = $request->get('email'); |
809 | } | 811 | } |
810 | 812 | ||
811 | // Избранные люди на корабль | 813 | // Избранные люди на корабль |
812 | public function selected_people(Request $request) { | 814 | public function selected_people(Request $request) { |
813 | $id = $request->get('id'); | 815 | $id = $request->get('id'); |
814 | $favorite_people = Job_title::query()->orderByDesc('sort')->OrderBy('name')-> | 816 | $favorite_people = Job_title::query()->orderByDesc('sort')->OrderBy('name')-> |
815 | where('is_remove', '=', '0')-> | 817 | where('is_remove', '=', '0')-> |
816 | where('is_bd', '=', '0')-> | 818 | where('is_bd', '=', '0')-> |
817 | where('position_id', $id)-> | 819 | where('position_id', $id)-> |
818 | get(); | 820 | get(); |
819 | return view('favorite_people', compact('favorite_people')); | 821 | return view('favorite_people', compact('favorite_people')); |
820 | } | 822 | } |
821 | } | 823 | } |
822 | 824 |
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; | 5 | use App\Http\Requests\RequestSendAdmin; |
6 | use App\Mail\MailAdminy; | 6 | use App\Mail\MailAdminy; |
7 | use App\Mail\MailRepair; | 7 | use App\Mail\MailRepair; |
8 | use App\Models\pages; | 8 | use App\Models\pages; |
9 | use Illuminate\Http\Request; | 9 | use Illuminate\Http\Request; |
10 | use Illuminate\Support\Facades\Mail; | 10 | use Illuminate\Support\Facades\Mail; |
11 | use Illuminate\Support\Facades\Redis; | 11 | use Illuminate\Support\Facades\Redis; |
12 | use PhpOffice\PhpSpreadsheet\Spreadsheet; | 12 | use PhpOffice\PhpSpreadsheet\Spreadsheet; |
13 | use PhpOffice\PhpSpreadsheet\Writer\Xlsx; | 13 | use PhpOffice\PhpSpreadsheet\Writer\Xlsx; |
14 | 14 | ||
15 | class PagesController extends Controller | 15 | class PagesController extends Controller |
16 | { | 16 | { |
17 | public function pages(pages $pages) { | 17 | public function pages(pages $pages) { |
18 | $page = pages::query()->where('slug', $pages->slug)->first(); | 18 | $page = pages::query()->where('slug', $pages->slug)->first(); |
19 | $slug = $pages->slug; | ||
19 | 20 | ||
20 | return view('pages', compact('page')); | 21 | return view('pages', compact('page', 'slug')); |
21 | } | 22 | } |
22 | 23 | ||
23 | public function form_feedback(RequestSendAdmin $request){ | 24 | public function form_feedback(RequestSendAdmin $request){ |
24 | $all = $request->all(); | 25 | $all = $request->all(); |
25 | 26 | ||
26 | Mail::to(env('EMAIL_ADMIN'))->send(new MailAdminy($all)); | 27 | Mail::to(env('EMAIL_ADMIN'))->send(new MailAdminy($all)); |
27 | 28 | ||
28 | return redirect()->back()->with('Сообщение было успешно отправлено и будет обработано'); | 29 | return redirect()->back()->with('Сообщение было успешно отправлено и будет обработано'); |
29 | } | 30 | } |
30 | 31 | ||
31 | public function redis() { | 32 | public function redis() { |
32 | $redis = Redis::connection(); | 33 | $redis = Redis::connection(); |
33 | $redis->set('User:CompanyName', 'РЕКАМОРЕ'); | 34 | $redis->set('User:CompanyName', 'РЕКАМОРЕ'); |
34 | $id = 1; | 35 | $id = 1; |
35 | //dd(Redis::get('MyVar')); | 36 | //dd(Redis::get('MyVar')); |
36 | $redis->command('rpush', array("Сообщение1")); | 37 | $redis->command('rpush', array("Сообщение1")); |
37 | $redis->command('rpush', array("Сообщение2")); | 38 | $redis->command('rpush', array("Сообщение2")); |
38 | $values = $redis->command('lrange', array("mylist", 0, 1)); | 39 | $values = $redis->command('lrange', array("mylist", 0, 1)); |
39 | dd($values); | 40 | dd($values); |
40 | 41 | ||
41 | } | 42 | } |
42 | 43 | ||
43 | public function excel() { | 44 | public function excel() { |
44 | $spreadsheet = new Spreadsheet(); | 45 | $spreadsheet = new Spreadsheet(); |
45 | $activeWorksheet = $spreadsheet->getActiveSheet(); | 46 | $activeWorksheet = $spreadsheet->getActiveSheet(); |
46 | $activeWorksheet->setCellValue('A1', 'Hello World !'); | 47 | $activeWorksheet->setCellValue('A1', 'Hello World !'); |
47 | 48 | ||
48 | $writer = new Xlsx($spreadsheet); | 49 | $writer = new Xlsx($spreadsheet); |
49 | $writer->save('hello_world.xlsx'); | 50 | $writer->save('hello_world.xlsx'); |
50 | } | 51 | } |
51 | 52 | ||
52 | public function private_policy() { | 53 | public function private_policy() { |
53 | return view('private_policy'); | 54 | return view('private_policy'); |
54 | } | 55 | } |
55 | 56 | ||
56 | public function terms_of_use() { | 57 | public function terms_of_use() { |
57 | return view('terms_of_use'); | 58 | return view('terms_of_use'); |
58 | } | 59 | } |
59 | } | 60 | } |
60 | 61 |
resources/views/TITLE_TEXT.blade.php
File was created | 1 | <div class="numbers__item"> | |
2 | <b>555+</b> | ||
3 | <span>Резюме</span> | ||
4 | Банальные, но неопровержимые выводы, а также элементы политического процесса лишь добавляют | ||
5 | фракционных разногласий и призваны к ответу. | ||
6 | </div> | ||
7 | <div class="numbers__item"> | ||
8 | <b>1 001+</b> | ||
9 | <span>Вакансий</span> | ||
10 | В рамках спецификации современных стандартов, диаграммы связей заблокированы в рамках своих | ||
11 | собственных рациональных ограничений. | ||
12 | </div> | ||
13 | <div class="numbers__item"> | ||
14 | <b>265</b> | ||
15 | <span>Компаний</span> | ||
16 | Но сторонники тоталитаризма в науке заблокированы в рамках своих собственных рациональных | ||
17 | ограничений. | ||
18 | </div> | ||
19 |
resources/views/admin/answers/index.blade.php
1 | @extends('layout.admin', ['title' => 'Админка - Отзывы о работодателях']) | 1 | @extends('layout.admin', ['title' => 'Админка - Отзывы о работодателях']) |
2 | 2 | ||
3 | @section('script') | 3 | @section('script') |
4 | <script> | 4 | <script> |
5 | $(document).ready(function() { | 5 | $(document).ready(function() { |
6 | $(document).on('click', '.checkban', function () { | 6 | $(document).on('click', '.checkban', function () { |
7 | var this_ = $(this); | 7 | var this_ = $(this); |
8 | var value = this_.val(); | 8 | var value = this_.val(); |
9 | var ajax_block = $('#ajax_block'); | 9 | var ajax_block = $('#ajax_block'); |
10 | var bool = 0; | 10 | var bool = 0; |
11 | 11 | ||
12 | if(this.checked){ | 12 | if(this.checked){ |
13 | bool = 1; | 13 | bool = 1; |
14 | } else { | 14 | } else { |
15 | bool = 0; | 15 | bool = 0; |
16 | } | 16 | } |
17 | var str ="id=" + value + "&is_moderate=" + bool; | 17 | var str ="id=" + value + "&is_moderate=" + bool; |
18 | console.log(str); | 18 | console.log(str); |
19 | $.ajax({ | 19 | $.ajax({ |
20 | type: "GET", | 20 | type: "GET", |
21 | url: "{{ url()->full()}}", | 21 | url: "{{ url()->full()}}", |
22 | data: str, | 22 | data: str, |
23 | success: function (data) { | 23 | success: function (data) { |
24 | console.log('Обновление таблицы пользователей '); | 24 | console.log('Обновление таблицы пользователей '); |
25 | //data = JSON.parse(data); | 25 | //data = JSON.parse(data); |
26 | //console.log(data); | 26 | //console.log(data); |
27 | ajax_block.html(data); | 27 | ajax_block.html(data); |
28 | }, | 28 | }, |
29 | headers: { | 29 | headers: { |
30 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 30 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
31 | }, | 31 | }, |
32 | error: function (data) { | 32 | error: function (data) { |
33 | console.log('Error: ' + data); | 33 | console.log('Error: ' + data); |
34 | } | 34 | } |
35 | }); | 35 | }); |
36 | }); | 36 | }); |
37 | 37 | ||
38 | }); | 38 | }); |
39 | </script> | 39 | </script> |
40 | @endsection | 40 | @endsection |
41 | 41 | ||
42 | @section('search') | 42 | @section('search') |
43 | <!--<div class="absolute inset-y-0 flex items-center pl-2"> | 43 | <!--<div class="absolute inset-y-0 flex items-center pl-2"> |
44 | <svg | 44 | <svg |
45 | class="w-4 h-4" | 45 | class="w-4 h-4" |
46 | aria-hidden="true" | 46 | aria-hidden="true" |
47 | fill="currentColor" | 47 | fill="currentColor" |
48 | viewBox="0 0 20 20" | 48 | viewBox="0 0 20 20" |
49 | > | 49 | > |
50 | <path | 50 | <path |
51 | fill-rule="evenodd" | 51 | fill-rule="evenodd" |
52 | d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" | 52 | d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" |
53 | clip-rule="evenodd" | 53 | clip-rule="evenodd" |
54 | ></path> | 54 | ></path> |
55 | </svg> | 55 | </svg> |
56 | </div> | 56 | </div> |
57 | <form action="" method="POST"> | 57 | <form action="" method="POST"> |
58 | <div style="float:left;"><input | 58 | <div style="float:left;"><input |
59 | class="w-full pl-8 pr-2 text-sm text-gray-700 placeholder-gray-600 bg-gray-100 border-0 rounded-md dark:placeholder-gray-500 dark:focus:shadow-outline-gray dark:focus:placeholder-gray-600 dark:bg-gray-700 dark:text-gray-200 focus:placeholder-gray-500 focus:bg-white focus:border-purple-300 focus:outline-none focus:shadow-outline-purple form-input" | 59 | class="w-full pl-8 pr-2 text-sm text-gray-700 placeholder-gray-600 bg-gray-100 border-0 rounded-md dark:placeholder-gray-500 dark:focus:shadow-outline-gray dark:focus:placeholder-gray-600 dark:bg-gray-700 dark:text-gray-200 focus:placeholder-gray-500 focus:bg-white focus:border-purple-300 focus:outline-none focus:shadow-outline-purple form-input" |
60 | style="width: 400px" | 60 | style="width: 400px" |
61 | type="text" | 61 | type="text" |
62 | placeholder="Искать..." | 62 | placeholder="Искать..." |
63 | aria-label="Search" | 63 | aria-label="Search" |
64 | /></div> | 64 | /></div> |
65 | <div style="float: left"> | 65 | <div style="float: left"> |
66 | <button type="submit" class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple">Искать</button> | 66 | <button type="submit" class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple">Искать</button> |
67 | </div> | 67 | </div> |
68 | </form>--> | 68 | </form>--> |
69 | @endsection | 69 | @endsection |
70 | 70 | ||
71 | @section('content') | 71 | @section('content') |
72 | <style> | 72 | <style> |
73 | .col { | 73 | .col { |
74 | width: 250px; /* Ширина блока */ | 74 | width: 250px; /* Ширина блока */ |
75 | word-wrap: break-word; /* Перенос слов */ | 75 | word-wrap: break-word; /* Перенос слов */ |
76 | word-break: break-all; | 76 | word-break: break-all; |
77 | } | 77 | } |
78 | </style> | 78 | </style> |
79 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> | 79 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> |
80 | <div class="w-full overflow-x-auto"> | 80 | <div class="w-full overflow-x-auto"> |
81 | <table class="w-full whitespace-no-wrap"> | 81 | <table class="w-full whitespace-no-wrap"> |
82 | <thead> | 82 | <thead> |
83 | <tr | 83 | <tr |
84 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" | 84 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" |
85 | > | 85 | > |
86 | <th class="px-4 py-3">№</th> | 86 | <th class="px-4 py-3">№</th> |
87 | <th class="px-4 py-3">Название компании</th> | 87 | <th class="px-4 py-3">Название компании</th> |
88 | <th class="px-4 py-3">Комментатор</th> | 88 | <th class="px-4 py-3">Комментатор</th> |
89 | <th class="px-4 py-3">Заголовок/Текст</th> | 89 | <th class="px-4 py-3">Заголовок/Текст</th> |
90 | <th class="px-4 py-3">Дата коммента</th> | 90 | <th class="px-4 py-3">Дата коммента</th> |
91 | <th class="px-4 py-3">Разрешить</th> | 91 | <th class="px-4 py-3">Разрешить</th> |
92 | </tr> | 92 | </tr> |
93 | </thead> | 93 | </thead> |
94 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> | 94 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> |
95 | @foreach($answers as $answer) | 95 | @foreach($answers as $answer) |
96 | <tr class="text-gray-700 dark:text-gray-400"> | 96 | <tr class="text-gray-700 dark:text-gray-400"> |
97 | <td class="px-4 py-3"> | 97 | <td class="px-4 py-3"> |
98 | {{$answer->id}} | 98 | {{$answer->id}} |
99 | </td> | 99 | </td> |
100 | <td class="px-4 py-3"> | 100 | <td class="px-4 py-3"> |
101 | {{$answer->employer->name_company}} | 101 | @if (isset($answer->employer->name_company)) |
102 | {{$answer->employer->name_company}} | ||
103 | @else | ||
104 | Не определено | ||
105 | @endif | ||
102 | </td> | 106 | </td> |
103 | <td class="px-4 py-3"> | 107 | <td class="px-4 py-3"> |
104 | {{$answer->user->name}} | 108 | {{$answer->user->name}} |
105 | </td> | 109 | </td> |
106 | <td class="px-4 py-3 col" > | 110 | <td class="px-4 py-3 col" > |
107 | <!--<div class="flex items-center text-sm"> | 111 | <!--<div class="flex items-center text-sm"> |
108 | <div >--> | 112 | <div >--> |
109 | <p class="font-semibold">{{$answer->title}}</p> | 113 | <p class="font-semibold">{{$answer->title}}</p> |
110 | <textarea style="width:250px; height: 100px;" readonly="readonly" class="text-xs text-gray-600 dark:text-gray-400">{{ $answer->text }}</textarea> | 114 | <textarea style="width:250px; height: 100px;" readonly="readonly" class="text-xs text-gray-600 dark:text-gray-400">{{ $answer->text }}</textarea> |
111 | <!--</div> | 115 | <!--</div> |
112 | </div>--> | 116 | </div>--> |
113 | </td> | 117 | </td> |
114 | <td class="px-4 py-3 text-sm"> | 118 | <td class="px-4 py-3 text-sm"> |
115 | {{ $answer->created_at }} | 119 | {{ $answer->created_at }} |
116 | </td> | 120 | </td> |
117 | <td class="px-4 py-3 text-sm"> | 121 | <td class="px-4 py-3 text-sm"> |
118 | <input type="checkbox" class="checkban" value="{{$answer->id}}" name="moderate_{{$answer->id}}" {{ ($answer->is_moderate) ? "checked" : "" }}/> | 122 | <input type="checkbox" class="checkban" value="{{$answer->id}}" name="moderate_{{$answer->id}}" {{ ($answer->is_moderate) ? "checked" : "" }}/> |
119 | </td> | 123 | </td> |
120 | </tr> | 124 | </tr> |
121 | @endforeach | 125 | @endforeach |
122 | </tbody> | 126 | </tbody> |
123 | </table> | 127 | </table> |
124 | </div> | 128 | </div> |
125 | 129 | ||
126 | <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> | 130 | <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> |
127 | <?=$answers->appends($_GET)->links('admin.pagginate'); ?> | 131 | <?=$answers->appends($_GET)->links('admin.pagginate'); ?> |
128 | </div> | 132 | </div> |
129 | </div> | 133 | </div> |
130 | @endsection | 134 | @endsection |
131 | 135 |
resources/views/admin/job_titles/index.blade.php
1 | @extends('layout.admin', ['title' => 'Админка - Справочник Должности']) | 1 | @extends('layout.admin', ['title' => 'Админка - Справочник Должности']) |
2 | 2 | ||
3 | @section('script') | 3 | @section('script') |
4 | <script> | ||
5 | console.log('Test system'); | ||
6 | $(document).on('change', '#sort_ajax', function() { | ||
7 | var this_ = $(this); | ||
8 | var val_ = this_.val(); | ||
9 | console.log('sort items '+val_); | ||
10 | |||
11 | $.ajax({ | ||
12 | type: "GET", | ||
13 | url: "{{ url()->current() }}", | ||
14 | data: "sort="+val_+"&search=@if ((isset($_GET['search']))&&(!empty($_GET['search']))){{$_GET['search']}}@endif", | ||
15 | success: function (data) { | ||
16 | console.log('Выбор сортировки'); | ||
17 | console.log(data); | ||
18 | history.pushState({}, '', "{{ route('employer.vacancy_list') }}?search=@if ((isset($_GET['search']))&&(!empty($_GET['search']))){{$_GET['search']}}@endif"+"&sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); | ||
19 | $('#main_ockar').html(data); | ||
20 | }, | ||
21 | headers: { | ||
22 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | ||
23 | }, | ||
24 | error: function (data) { | ||
25 | data = JSON.stringify(data); | ||
26 | console.log('Error: ' + data); | ||
27 | } | ||
28 | }); | ||
29 | }); | ||
30 | </script> | ||
4 | @endsection | 31 | @endsection |
5 | 32 | ||
6 | @section('search') | 33 | @section('search') |
7 | 34 | ||
8 | @endsection | 35 | @endsection |
9 | 36 | ||
10 | @section('content') | 37 | @section('content') |
11 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> | 38 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> |
12 | <div class="w-full overflow-x-auto"> | 39 | <div class="w-full overflow-x-auto"> |
13 | <a class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple" href="{{ route('admin.job-titles.create') }}">Создать должность</a><br><br> | 40 | <a class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple" href="{{ route('admin.job-titles.create') }}">Создать должность</a><br><br> |
14 | <table class="w-full whitespace-no-wrap"> | 41 | <table class="w-full whitespace-no-wrap"> |
15 | <thead> | 42 | <thead> |
16 | <tr | 43 | <tr |
17 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" | 44 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" |
18 | > | 45 | > |
19 | <th class="px-4 py-3">№</th> | 46 | <th class="px-4 py-3">№</th> |
20 | <th class="px-4 py-3">Родитель</th> | 47 | <th class="px-4 py-3">Родитель</th> |
21 | <th class="px-4 py-3">Должность</th> | 48 | <th class="px-4 py-3">Должность</th> |
22 | <th class="px-4 py-3">Видимость</th> | 49 | <th class="px-4 py-3">Видимость</th> |
23 | <th class="px-4 py-3">Сортировка</th> | 50 | <th class="px-4 py-3"><a id="sort_jobs" name="sort_jobs" @if(isset($_GET['sort'])) @if($_GET['sort']=='up') href="?sort=down" @else href="?sort=up" @endif @else href="?sort=down" @endif>Сортировка ↑↓</a></th> |
24 | <th class="px-4 py-3">Дата создания</th> | 51 | <th class="px-4 py-3">Дата создания</th> |
25 | <th class="px-4 py-3">Изменить</th> | 52 | <th class="px-4 py-3">Изменить</th> |
26 | </tr> | 53 | </tr> |
27 | </thead> | 54 | </thead> |
28 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> | 55 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> |
29 | @foreach($Jobs as $job) | 56 | @foreach($Jobs as $job) |
30 | <tr class="text-gray-700 dark:text-gray-400"> | 57 | <tr class="text-gray-700 dark:text-gray-400"> |
31 | <td class="px-4 py-3 text-xs"> | 58 | <td class="px-4 py-3 text-xs"> |
32 | {{$job->id}} | 59 | {{$job->id}} |
33 | </td> | 60 | </td> |
34 | <td class="px-4 py-3 text-xs"> | 61 | <td class="px-4 py-3 text-xs"> |
35 | @if (empty($job->parent->id)) | 62 | @if (empty($job->parent->id)) |
36 | Не задан | 63 | Не задан |
37 | @else | 64 | @else |
38 | {{ mb_strimwidth($job->parent->name, 0, 35, "...") }}({{$job->parent->id}}) | 65 | {{ mb_strimwidth($job->parent->name, 0, 35, "...") }}({{$job->parent->id}}) |
39 | @endif | 66 | @endif |
40 | </td> | 67 | </td> |
41 | <td class="px-4 py-3 text-xs"> | 68 | <td class="px-4 py-3 text-xs"> |
42 | {{ mb_strimwidth($job->name, 0, 35, "...") }} | 69 | {{ mb_strimwidth($job->name, 0, 35, "...") }} |
43 | </td> | 70 | </td> |
44 | <td class="px-4 py-3 text-xs"> | 71 | <td class="px-4 py-3 text-xs"> |
45 | @switch ($job->is_bd) | 72 | @switch ($job->is_bd) |
46 | @case (0) Работодатель @break | 73 | @case (0) Работодатель @break |
47 | @case (1) Работник @break | 74 | @case (1) Работник @break |
48 | @case (2) База данных @break | 75 | @case (2) База данных @break |
49 | @default База данных @break | 76 | @default База данных @break |
50 | @endswitch | 77 | @endswitch |
51 | </td> | 78 | </td> |
52 | <td class="px-4 py-3 text-xs"> | 79 | <td class="px-4 py-3 text-xs"> |
53 | {{$job->sort}} | 80 | {{$job->sort}} |
54 | </td> | 81 | </td> |
55 | <td class="px-4 py-3 text-sm text-xs"> | 82 | <td class="px-4 py-3 text-sm text-xs"> |
56 | {{ $job->created_at }} | 83 | {{ $job->created_at }} |
57 | </td> | 84 | </td> |
58 | <td class="px-4 py-3 text-sm_ text-xs"> | 85 | <td class="px-4 py-3 text-sm_ text-xs"> |
59 | <form action="{{ route('admin.job-titles.destroy', ['job_title' => $job->id]) }}" method="POST"> | 86 | <form action="{{ route('admin.job-titles.destroy', ['job_title' => $job->id]) }}" method="POST"> |
60 | <a href="{{ route('admin.job-titles.edit', ['job_title' => $job->id]) }}">Изменить</a> | | 87 | <a href="{{ route('admin.job-titles.edit', ['job_title' => $job->id]) }}">Изменить</a> | |
61 | @csrf | 88 | @csrf |
62 | @method('DELETE') | 89 | @method('DELETE') |
63 | <input class="btn btn-danger" type="submit" value="Удалить"/> | 90 | <input class="btn btn-danger" type="submit" value="Удалить"/> |
64 | </form> | 91 | </form> |
65 | </td> | 92 | </td> |
66 | </tr> | 93 | </tr> |
67 | @endforeach | 94 | @endforeach |
68 | </tbody> | 95 | </tbody> |
69 | </table> | 96 | </table> |
70 | </div> | 97 | </div> |
71 | 98 | ||
72 | <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> | 99 | <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> |
73 | <?=$Jobs->appends($_GET)->links('admin.pagginate'); ?> | 100 | <?=$Jobs->appends($_GET)->links('admin.pagginate'); ?> |
74 | </div> | 101 | </div> |
75 | </div> | 102 | </div> |
76 | @endsection | 103 | @endsection |
77 | 104 |
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: "{{ url()->current() }}", | 13 | url: "{{ url()->current() }}", |
14 | data: "sort="+val_+"&search=@if ((isset($_GET['search']))&&(!empty($_GET['search']))){{$_GET['search']}}@endif", | 14 | data: "sort="+val_+"&search=@if ((isset($_GET['search']))&&(!empty($_GET['search']))){{$_GET['search']}}@endif", |
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') }}?search=@if ((isset($_GET['search']))&&(!empty($_GET['search']))){{$_GET['search']}}@endif"+"&sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); | 18 | history.pushState({}, '', "{{ route('employer.vacancy_list') }}?search=@if ((isset($_GET['search']))&&(!empty($_GET['search']))){{$_GET['search']}}@endif"+"&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" action="{{ url()->current() }}" method="GET"> | 57 | <form class="search" action="{{ url()->current() }}" method="GET"> |
58 | <input type="search" name="search" class="input" placeholder="Поиск…" value="@if ((isset($_GET['search'])) && (!empty($_GET['search']))) {{ $_GET['search'] }}@endif"> | 58 | <input type="search" name="search" class="input" placeholder="Поиск…" value="@if ((isset($_GET['search'])) && (!empty($_GET['search']))) {{ $_GET['search'] }}@endif"> |
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" @if (isset($_GET['sort']) && ($_GET['sort'] == 'default')) selected @endif>От новых к старым (по умолчанию)</option> |
71 | <option value="name_up">По имени (возрастание)</option> | 71 | <option value="public" @if (isset($_GET['sort']) && ($_GET['sort'] == 'public')) selected @endif>Опубликовано</option> |
72 | <option value="nopublic" @if (isset($_GET['sort']) && ($_GET['sort'] == 'nopublic')) selected @endif>Не опубликовано</option> | ||
73 | <!--<option value="name_up">По имени (возрастание)</option> | ||
72 | <option value="name_down">По имени (убывание)</option> | 74 | <option value="name_down">По имени (убывание)</option> |
73 | <option value="created_at_up">По дате (возрастание)</option> | 75 | <option value="created_at_up">По дате (возрастание)</option> |
74 | <option value="created_at_down">По дате (убывание)</option> | 76 | <option value="created_at_down">По дате (убывание)</option>--> |
75 | </select> | 77 | </select> |
76 | </div> | 78 | </div> |
77 | </div> | 79 | </div> |
78 | </div> | 80 | </div> |
79 | 81 | ||
80 | <div class="table table_spoiler" id="main_ockar" name="main_oskar"> | 82 | <div class="table table_spoiler" id="main_ockar" name="main_oskar"> |
81 | @if ($vacancy_list->count()) | 83 | @if ($vacancy_list->count()) |
82 | <div class="table__scroll"> | 84 | <div class="table__scroll"> |
83 | <div class="table__body table__body_min-width"> | 85 | <div class="table__body table__body_min-width"> |
84 | <table> | 86 | <table> |
85 | <thead> | 87 | <thead> |
86 | <tr> | 88 | <tr> |
87 | <th>№</th> | 89 | <th>№</th> |
88 | <th>Название</th> | 90 | <th>Название</th> |
89 | <th>Дата добавления<br>/ обновления</th> | 91 | <th>Дата добавления<br>/ обновления</th> |
90 | <th style="display:none">Должности</th> | 92 | <th style="display:none">Должности</th> |
91 | <th>Статус</th> | 93 | <th>Статус</th> |
92 | <th>Действия</th> | 94 | <th>Действия</th> |
93 | </tr> | 95 | </tr> |
94 | </thead> | 96 | </thead> |
95 | <tbody> | 97 | <tbody> |
96 | @foreach($vacancy_list as $it) | 98 | @foreach($vacancy_list as $it) |
97 | <tr> | 99 | <tr> |
98 | <td>{{ $it->id }}</td> | 100 | <td>{{ $it->id }}</td> |
99 | <td>{{ $it->name }}</td> | 101 | <td>{{ $it->name }}</td> |
100 | <td>{{ date('d.m.Y', strtotime($it->created_at)) }} <br>/ {{ date('d.m.Y', strtotime($it->updated_at)) }}</td> | 102 | <td>{{ date('d.m.Y', strtotime($it->created_at)) }} <br>/ {{ date('d.m.Y', strtotime($it->updated_at)) }}</td> |
101 | <td style="display:none"> <a href="{{ route('employer.add_job_in_vac', ['ad_employer' => $it->id]) }}" class="button">Добавить</a> | 103 | <td style="display:none"> <a href="{{ route('employer.add_job_in_vac', ['ad_employer' => $it->id]) }}" class="button">Добавить</a> |
102 | 104 | ||
103 | @if ($it->jobs->count()) | 105 | @if ($it->jobs->count()) |
104 | @foreach ($it->jobs as $key => $it_um) | 106 | @foreach ($it->jobs as $key => $it_um) |
105 | <p>@if (isset($it->jobs_code[$key])) | 107 | <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> | 108 | <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> | 109 | <a href="{{ route('employer.delete_job_in_vac', ['ad_job' => $it->jobs_code[$key]->id]) }}" style="text-decoration: underline">(Del)</a> |
108 | @endif | 110 | @endif |
109 | </p> | 111 | </p> |
110 | @endforeach | 112 | @endforeach |
111 | @else | 113 | @else |
112 | Нет связанных <br> с вакансией должностей | 114 | Нет связанных <br> с вакансией должностей |
113 | @endif | 115 | @endif |
114 | </td> | 116 | </td> |
115 | <td> | 117 | <td> |
116 | @if ($it->active_is) | 118 | @if ($it->active_is) |
117 | <span class="table__status green"><i></i>Опубликовано</span> | 119 | <span class="table__status green"><i></i>Опубликовано</span> |
118 | @else | 120 | @else |
119 | <span class="table__status"><i></i>Не опубликовано</span> | 121 | <span class="table__status"><i></i>Не опубликовано</span> |
120 | @endif | 122 | @endif |
121 | </td> | 123 | </td> |
122 | <td> | 124 | <td> |
123 | <span class="table__controls"> | 125 | <span class="table__controls"> |
124 | <a class="table__controls-item up-it" href="{{ route('employer.vacancy_up', ['ad_employer' => $it->id]) }}"> | 126 | <a class="table__controls-item up-it" href="{{ route('employer.vacancy_up', ['ad_employer' => $it->id]) }}"> |
125 | <svg> | 127 | <svg> |
126 | <use xlink:href="{{ asset('images/sprite.svg#arrow-radius') }}"></use> | 128 | <use xlink:href="{{ asset('images/sprite.svg#arrow-radius') }}"></use> |
127 | </svg> | 129 | </svg> |
128 | </a> | 130 | </a> |
129 | <a href="{{ route('employer.vacancy_edit', ['ad_employer' => $it->id]) }}" class="table__controls-item"> | 131 | <a href="{{ route('employer.vacancy_edit', ['ad_employer' => $it->id]) }}" class="table__controls-item"> |
130 | <svg> | 132 | <svg> |
131 | <use xlink:href="{{ asset('images/sprite.svg#pencil') }}"></use> | 133 | <use xlink:href="{{ asset('images/sprite.svg#pencil') }}"></use> |
132 | </svg> | 134 | </svg> |
133 | </a> | 135 | </a> |
134 | <a class="table__controls-item" href="{{ route('employer.vacancy_delete', ['ad_employer' => $it->id]) }}"> | 136 | <a class="table__controls-item" href="{{ route('employer.vacancy_delete', ['ad_employer' => $it->id]) }}"> |
135 | <svg> | 137 | <svg> |
136 | <use xlink:href="{{ asset('images/sprite.svg#cross') }}"></use> | 138 | <use xlink:href="{{ asset('images/sprite.svg#cross') }}"></use> |
137 | </svg> | 139 | </svg> |
138 | </a> | 140 | </a> |
139 | @if ($it->active_is) | 141 | @if ($it->active_is) |
140 | <a href="{{ route('employer.vacancy_eye', ['ad_employer' => $it->id, 'status' => 0]) }}" class="table__controls-item"> | 142 | <a href="{{ route('employer.vacancy_eye', ['ad_employer' => $it->id, 'status' => 0]) }}" class="table__controls-item"> |
141 | <svg> | 143 | <svg> |
142 | <use xlink:href="{{ asset('images/sprite.svg#eye') }}"></use> | 144 | <use xlink:href="{{ asset('images/sprite.svg#eye') }}"></use> |
143 | </svg> | 145 | </svg> |
144 | </a> | 146 | </a> |
145 | @else | 147 | @else |
146 | <a href="{{ route('employer.vacancy_eye', ['ad_employer' => $it->id, 'status' => 1]) }}" class="table__controls-item"> | 148 | <a href="{{ route('employer.vacancy_eye', ['ad_employer' => $it->id, 'status' => 1]) }}" class="table__controls-item"> |
147 | <svg> | 149 | <svg> |
148 | <use xlink:href="{{ asset('images/sprite.svg#eye-3') }}"></use> | 150 | <use xlink:href="{{ asset('images/sprite.svg#eye-3') }}"></use> |
149 | </svg> | 151 | </svg> |
150 | </a> | 152 | </a> |
151 | @endif | 153 | @endif |
152 | @if ($Employer->social_is == 1) | 154 | @if ($Employer->social_is == 1) |
153 | <a href="https://telegram.me/share/url?url={{ route('vacancie', ['vacancy' => $it->id]) }}&text={{ $it->text }}" class="table__controls-item"> | 155 | <a href="https://telegram.me/share/url?url={{ route('vacancie', ['vacancy' => $it->id]) }}&text={{ $it->text }}" class="table__controls-item"> |
154 | <svg> | 156 | <svg> |
155 | <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> | 157 | <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> |
156 | </svg> | 158 | </svg> |
157 | </a> | 159 | </a> |
158 | @endif | 160 | @endif |
159 | <!--<a class="btn_telegram_share table__controls-item" href="https://telegram.me/share/url?url=ВАШ_URL&text={{ $it->name }}"> | 161 | <!--<a class="btn_telegram_share table__controls-item" href="https://telegram.me/share/url?url=ВАШ_URL&text={{ $it->name }}"> |
160 | <svg> | 162 | <svg> |
161 | <use xlink:href=" asset('images/sprite.svg#arrow-radius') }}"></use> | 163 | <use xlink:href=" asset('images/sprite.svg#arrow-radius') }}"></use> |
162 | </svg> | 164 | </svg> |
163 | </a>--> | 165 | </a>--> |
164 | 166 | ||
165 | <!--<button type="button" class="table__controls-item"> | 167 | <!--<button type="button" class="table__controls-item"> |
166 | <svg> | 168 | <svg> |
167 | <use xlink:href=" asset('images/sprite.svg#tg') }}"></use> | 169 | <use xlink:href=" asset('images/sprite.svg#tg') }}"></use> |
168 | </svg> | 170 | </svg> |
169 | </button> | 171 | </button> |
170 | --> | 172 | --> |
171 | </span> | 173 | </span> |
172 | </td> | 174 | </td> |
173 | </tr> | 175 | </tr> |
174 | @endforeach | 176 | @endforeach |
175 | </tbody> | 177 | </tbody> |
176 | </table> | 178 | </table> |
177 | </div><br> | 179 | </div><br> |
178 | {{ $vacancy_list->appends($_GET)->links('paginate') }} | 180 | {{ $vacancy_list->appends($_GET)->links('paginate') }} |
179 | </div> | 181 | </div> |
180 | 182 | ||
181 | 183 | ||
182 | @else | 184 | @else |
183 | 185 | ||
184 | <div class="notify"> | 186 | <div class="notify"> |
185 | <svg> | 187 | <svg> |
186 | <use xlink:href="{{ asset('images/sprite.svg#i') }}"></use> | 188 | <use xlink:href="{{ asset('images/sprite.svg#i') }}"></use> |
187 | </svg> | 189 | </svg> |
188 | <span>Вы ещё не разместили ни одной вакансии</span> | 190 | <span>Вы ещё не разместили ни одной вакансии</span> |
189 | </div> | 191 | </div> |
190 | @endif | 192 | @endif |
191 | </div> | 193 | </div> |
192 | </div> | 194 | </div> |
193 | </div> | 195 | </div> |
194 | </div> | 196 | </div> |
195 | </div> | 197 | </div> |
196 | </section> | 198 | </section> |
197 | </div> | 199 | </div> |
198 | @endsection | 200 | @endsection |
199 | 201 |
resources/views/employers/subcribe.blade.php
1 | @extends('layout.frontend', ['title' => 'Настройка уведомлений - РекаМоре']) | 1 | @extends('layout.frontend', ['title' => 'Настройка уведомлений - РекаМоре']) |
2 | 2 | ||
3 | @section('scripts') | 3 | @section('scripts') |
4 | 4 | ||
5 | @endsection | 5 | @endsection |
6 | 6 | ||
7 | @section('content') | 7 | @section('content') |
8 | <section class="cabinet"> | 8 | <section class="cabinet"> |
9 | <div class="container"> | 9 | <div class="container"> |
10 | <ul class="breadcrumbs cabinet__breadcrumbs"> | 10 | <ul class="breadcrumbs cabinet__breadcrumbs"> |
11 | <li><a href="{{ route('index') }}">Главная</a></li> | 11 | <li><a href="{{ route('index') }}">Главная</a></li> |
12 | <li><b>Личный кабинет</b></li> | 12 | <li><b>Личный кабинет</b></li> |
13 | </ul> | 13 | </ul> |
14 | <div class="cabinet__wrapper"> | 14 | <div class="cabinet__wrapper"> |
15 | <div class="cabinet__side"> | 15 | <div class="cabinet__side"> |
16 | <div class="cabinet__side-toper"> | 16 | <div class="cabinet__side-toper"> |
17 | @include('employers.emblema') | 17 | @include('employers.emblema') |
18 | </div> | 18 | </div> |
19 | 19 | ||
20 | 20 | ||
21 | @include('employers.menu', ['item' => 12]) | 21 | @include('employers.menu', ['item' => 11]) |
22 | </div> | 22 | </div> |
23 | 23 | ||
24 | <div class="cabinet__body"> | 24 | <div class="cabinet__body"> |
25 | <div class="cabinet__body-item"> | 25 | <div class="cabinet__body-item"> |
26 | <h2 class="title cabinet__title">Настройки уведомлений</h2> | 26 | <h2 class="title cabinet__title">Настройки уведомлений</h2> |
27 | </div> | 27 | </div> |
28 | @include('messages_error') | 28 | @include('messages_error') |
29 | <div class="cabinet__body-item"> | 29 | <div class="cabinet__body-item"> |
30 | <form class="cabinet__nots" action="{{ route('employer.save_subscribe') }}"> | 30 | <form class="cabinet__nots" action="{{ route('employer.save_subscribe') }}"> |
31 | @csrf | 31 | @csrf |
32 | <p class="cabinet__text">Укажите адрес электронной почты для получения уведомлений</p> | 32 | <p class="cabinet__text">Укажите адрес электронной почты для получения уведомлений</p> |
33 | <input type="email" name="email" class="input" placeholder="info@rekamore.su" required> | 33 | <input type="email" name="email" class="input" placeholder="info@rekamore.su" required> |
34 | <label class="checkbox"> | 34 | <label class="checkbox"> |
35 | <input type="checkbox" name="email_msg" class="checkbox__input"> | 35 | <input type="checkbox" name="email_msg" class="checkbox__input"> |
36 | <span class="checkbox__icon"> | 36 | <span class="checkbox__icon"> |
37 | <svg> | 37 | <svg> |
38 | <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use> | 38 | <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use> |
39 | </svg> | 39 | </svg> |
40 | </span> | 40 | </span> |
41 | <span class="checkbox__text"> | 41 | <span class="checkbox__text"> |
42 | <span>Получать уведомления о новых сообщениях на почту</span> | 42 | <span>Получать уведомления о новых сообщениях на почту</span> |
43 | </span> | 43 | </span> |
44 | </label> | 44 | </label> |
45 | <button type="submit" class="button">Сохранить</button> | 45 | <button type="submit" class="button">Сохранить</button> |
46 | </form> | 46 | </form> |
47 | </div> | 47 | </div> |
48 | </div> | 48 | </div> |
49 | </div> | 49 | </div> |
50 | </div> | 50 | </div> |
51 | </section> | 51 | </section> |
52 | </div> | 52 | </div> |
53 | @endsection | 53 | @endsection |
54 | 54 |
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 | @include('messages_error') |
9 | <section class="work"> | 9 | <section class="work"> |
10 | <div class="container"> | 10 | <div class="container"> |
11 | <img src="{{ asset('images/1.png') }}" alt="" class="work__pic"> | 11 | <img src="{{ asset('images/1.png') }}" alt="" class="work__pic"> |
12 | <div class="work__body"> | 12 | <div class="work__body"> |
13 | <div class="work__title"> | 13 | <div class="work__title"> |
14 | <h4>Работа в море / | 14 | <h4>Работа в море / |
15 | <span class="br">Работа на реке</span></h4> | 15 | <span class="br">Работа на реке</span></h4> |
16 | </div> | 16 | </div> |
17 | <div class="work__text">Профессиональная сеть морского сообщества «RekaMore.su» приветствует вас — | 17 | <div class="work__text">Профессиональная сеть морского сообщества «RekaMore.su» приветствует вас — |
18 | тех, кто не представляет себе жизнь без моря, тех, кто готов связать свою жизнь с работой в | 18 | тех, кто не представляет себе жизнь без моря, тех, кто готов связать свою жизнь с работой в |
19 | сложных, но очень интересных условиях. </div> | 19 | сложных, но очень интересных условиях. </div> |
20 | <div class="work__list"> | 20 | <div class="work__list"> |
21 | <div>Тысячи соискателей увидят Ваше объявление</div> | 21 | <div>Тысячи соискателей увидят Ваше объявление</div> |
22 | <div>Десятки компаний выкладывают объявления каждый день</div> | 22 | <div>Десятки компаний выкладывают объявления каждый день</div> |
23 | </div> | 23 | </div> |
24 | <form class="search work__form" action="{{ route('search_vacancies') }}" method="GET"> | 24 | <form class="search work__form" action="{{ route('search_vacancies') }}" method="GET"> |
25 | <input type="search" id="search" name="search" class="input" placeholder="Желаемая должность" required> | 25 | <input type="search" id="search" name="search" class="input" placeholder="Желаемая должность" required> |
26 | <!--<div class="select select_search thing__select"> | 26 | <!--<div class="select select_search thing__select"> |
27 | <div class="select__icon"> | 27 | <div class="select__icon"> |
28 | <svg> | 28 | <svg> |
29 | <use xlink:href=" asset('images/sprite.svg#search') }}"></use> | 29 | <use xlink:href=" asset('images/sprite.svg#search') }}"></use> |
30 | </svg> | 30 | </svg> |
31 | </div> | 31 | </div> |
32 | <select class="js-select2 jobs" id="search" name="search"> | 32 | <select class="js-select2 jobs" id="search" name="search"> |
33 | <option value="0">Выберите должность</option> | 33 | <option value="0">Выберите должность</option> |
34 | if ($Job_title->count()) | 34 | if ($Job_title->count()) |
35 | foreach($Job_title as $JT) | 35 | foreach($Job_title as $JT) |
36 | <option value=" $JT->id }}" if ((isset($_GET['job'])) && ($_GET['job'] == $JT->id)) selected endif> $JT->name }}</option> | 36 | <option value=" $JT->id }}" if ((isset($_GET['job'])) && ($_GET['job'] == $JT->id)) selected endif> $JT->name }}</option> |
37 | endforeach | 37 | endforeach |
38 | endif | 38 | endif |
39 | </select> | 39 | </select> |
40 | </div>--> | 40 | </div>--> |
41 | <button type="submit" class="button button_light">Посмотреть вакансии</button> | 41 | <button type="submit" class="button button_light">Посмотреть вакансии</button> |
42 | <span> | 42 | <span> |
43 | <svg> | 43 | <svg> |
44 | <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> | 44 | <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> |
45 | </svg> | 45 | </svg> |
46 | </span> | 46 | </span> |
47 | </form> | 47 | </form> |
48 | @guest | 48 | @guest |
49 | <a data-fancybox data-src="#question2" data-options='{"touch":false,"autoFocus":false}' class="button work__search">Я ищу сотрудника</a> | 49 | <a data-fancybox data-src="#question2" data-options='{"touch":false,"autoFocus":false}' class="button work__search">Я ищу сотрудника</a> |
50 | @else | 50 | @else |
51 | @if (Auth()->user()->is_lookin) | 51 | @if (Auth()->user()->is_lookin) |
52 | <a href="{{ route('bd_resume') }}" class="button work__search">Я ищу сотрудника</a> | 52 | <a href="{{ route('bd_resume') }}" class="button work__search">Я ищу сотрудника</a> |
53 | @else | 53 | @else |
54 | <a data-fancybox data-src="#question3" data-options='{"touch":false,"autoFocus":false}' class="button work__search">Я ищу сотрудника</a> | 54 | <a data-fancybox data-src="#question3" data-options='{"touch":false,"autoFocus":false}' class="button work__search">Я ищу сотрудника</a> |
55 | @endif | 55 | @endif |
56 | @endguest | 56 | @endguest |
57 | <div class="work__get"> | 57 | <div class="work__get"> |
58 | <b>Скачать приложение</b> | 58 | <b>Скачать приложение</b> |
59 | <a href=""> | 59 | <a href=""> |
60 | <img src="{{ asset('images/google.svg') }}" alt=""> | 60 | <img src="{{ asset('images/google.svg') }}" alt=""> |
61 | </a> | 61 | </a> |
62 | <a href=""> | 62 | <a href=""> |
63 | <img src="{{ asset('images/apple.svg') }}" alt=""> | 63 | <img src="{{ asset('images/apple.svg') }}" alt=""> |
64 | </a> | 64 | </a> |
65 | </div> | 65 | </div> |
66 | </div> | 66 | </div> |
67 | </div> | 67 | </div> |
68 | </section> | 68 | </section> |
69 | <section class="numbers"> | 69 | <section class="numbers"> |
70 | <div class="container"> | 70 | <div class="container"> |
71 | <div class="numbers__body"> | 71 | <div class="numbers__body"> |
72 | <div class="numbers__item"> | 72 | @include('TITLE_TEXT') |
73 | <b>500+</b> | ||
74 | <span>Резюме</span> | ||
75 | Банальные, но неопровержимые выводы, а также элементы политического процесса лишь добавляют | ||
76 | фракционных разногласий и призваны к ответу. | ||
77 | </div> | ||
78 | <div class="numbers__item"> | ||
79 | <b>1 000+</b> | ||
80 | <span>Вакансий</span> | ||
81 | В рамках спецификации современных стандартов, диаграммы связей заблокированы в рамках своих | ||
82 | собственных рациональных ограничений. | ||
83 | </div> | ||
84 | <div class="numbers__item"> | ||
85 | <b>265</b> | ||
86 | <span>Компаний</span> | ||
87 | Но сторонники тоталитаризма в науке заблокированы в рамках своих собственных рациональных | ||
88 | ограничений. | ||
89 | </div> | ||
90 | </div> | 73 | </div> |
91 | </div> | 74 | </div> |
92 | </section> | 75 | </section> |
93 | <!--<section class="vacancies"> | 76 | <!--<section class="vacancies"> |
94 | <div class="container"> | 77 | <div class="container"> |
95 | <div class="title"><h4>Новые вакансии</h4></div> | 78 | <div class="title"><h4>Новые вакансии</h4></div> |
96 | <div class="vacancies__body"> | 79 | <div class="vacancies__body"> |
97 | <a class="vacancies__more button button_light js-parent-toggle" href="{{ route('vacancies') }}">Все должности</a> | 80 | <a class="vacancies__more button button_light js-parent-toggle" href="{{ route('vacancies') }}">Все должности</a> |
98 | <div class="vacancies__list"> | 81 | <div class="vacancies__list"> |
99 | _if ($categories->count()) | 82 | _if ($categories->count()) |
100 | _foreach ($categories as $cat) | 83 | _foreach ($categories as $cat) |
101 | <a href=" route('list-vacancies', ['categories' => $cat->id]) }}" class="vacancies__item"> | 84 | <a href=" route('list-vacancies', ['categories' => $cat->id]) }}" class="vacancies__item"> |
102 | <span style="border-color:#F4C4C2"> | 85 | <span style="border-color:#F4C4C2"> |
103 | <b> $cat->name }}</b> | 86 | <b> $cat->name }}</b> |
104 | <i>Вакансий: <span> $cat->cnt }}</span></i> | 87 | <i>Вакансий: <span> $cat->cnt }}</span></i> |
105 | </span> | 88 | </span> |
106 | </a> | 89 | </a> |
107 | _endforeach | 90 | _endforeach |
108 | _else | 91 | _else |
109 | Тут пока нет никаких вакансий | 92 | Тут пока нет никаких вакансий |
110 | _endif | 93 | _endif |
111 | </div> | 94 | </div> |
112 | </div> | 95 | </div> |
113 | </div> | 96 | </div> |
114 | </section>--> | 97 | </section>--> |
115 | 98 | ||
116 | <main class="main"> | 99 | <main class="main"> |
117 | <div class="container"> | 100 | <div class="container"> |
118 | <div class="main__vacancies"> | 101 | <div class="main__vacancies"> |
119 | <h2 class="main__vacancies-title">Категории вакансий</h2> | 102 | <h2 class="main__vacancies-title">Категории вакансий</h2> |
120 | <div class="vacancies__body"> | 103 | <div class="vacancies__body"> |
121 | <div class="vacancies__list" id="block_ajax" name="block_ajax"> | 104 | <div class="vacancies__list" id="block_ajax" name="block_ajax"> |
122 | @foreach($Main_Job as $key => $it_main) | 105 | @foreach($Main_Job as $key => $it_main) |
123 | <div class="vacancies__list-col"> | 106 | <div class="vacancies__list-col"> |
124 | @include('block_real_new', ['it_main' => $it_main, 'category' => $key]) | 107 | @include('block_real_new', ['it_main' => $it_main, 'category' => $key]) |
125 | </div> | 108 | </div> |
126 | @endforeach | 109 | @endforeach |
127 | <!--_include('block_real', ['flot' => $flot, 'position' => $Position[$flot->position_id]])--> | 110 | <!--_include('block_real', ['flot' => $flot, 'position' => $Position[$flot->position_id]])--> |
128 | </div> | 111 | </div> |
129 | </div> | 112 | </div> |
130 | </div> | 113 | </div> |
131 | </div> | 114 | </div> |
132 | </main> | 115 | </main> |
133 | 116 | ||
134 | <section class="employer"> | 117 | <section class="employer"> |
135 | <div class="container"> | 118 | <div class="container"> |
136 | <div class="title"><h4>Работодатели</h4></div> | 119 | <div class="title"><h4>Работодатели</h4></div> |
137 | <!--<div class="swiper js-employer-swiper"> | 120 | <!--<div class="swiper js-employer-swiper"> |
138 | <div class="swiper-wrapper"> | 121 | <div class="swiper-wrapper"> |
139 | <div class="swiper-slide"> | 122 | <div class="swiper-slide"> |
140 | <div class="employer__item"> | 123 | <div class="employer__item"> |
141 | <a href="#"> | 124 | <a href="#"> |
142 | <img src="images/logos/1.jpg" alt=""> | 125 | <img src="images/logos/1.jpg" alt=""> |
143 | </a> | 126 | </a> |
144 | <a href="#"> | 127 | <a href="#"> |
145 | <img src="images/logos/5.jpg" alt=""> | 128 | <img src="images/logos/5.jpg" alt=""> |
146 | </a> | 129 | </a> |
147 | <a href="#"> | 130 | <a href="#"> |
148 | <img src="images/logos/9.jpg" alt=""> | 131 | <img src="images/logos/9.jpg" alt=""> |
149 | </a> | 132 | </a> |
150 | <a href="#"> | 133 | <a href="#"> |
151 | <img src="images/logos/13.jpg" alt=""> | 134 | <img src="images/logos/13.jpg" alt=""> |
152 | </a> | 135 | </a> |
153 | <a href="#"> | 136 | <a href="#"> |
154 | <img src="images/logos/17.jpg" alt=""> | 137 | <img src="images/logos/17.jpg" alt=""> |
155 | </a> | 138 | </a> |
156 | </div> | 139 | </div> |
157 | </div> | 140 | </div> |
158 | <div class="swiper-slide"> | 141 | <div class="swiper-slide"> |
159 | <div class="employer__item"> | 142 | <div class="employer__item"> |
160 | <a href="#"> | 143 | <a href="#"> |
161 | <img src="images/logos/2.jpg" alt=""> | 144 | <img src="images/logos/2.jpg" alt=""> |
162 | </a> | 145 | </a> |
163 | <a href="#"> | 146 | <a href="#"> |
164 | <img src="images/logos/6.jpg" alt=""> | 147 | <img src="images/logos/6.jpg" alt=""> |
165 | </a> | 148 | </a> |
166 | <a href="#"> | 149 | <a href="#"> |
167 | <img src="images/logos/10.jpg" alt=""> | 150 | <img src="images/logos/10.jpg" alt=""> |
168 | </a> | 151 | </a> |
169 | <a href="#"> | 152 | <a href="#"> |
170 | <img src="images/logos/14.jpg" alt=""> | 153 | <img src="images/logos/14.jpg" alt=""> |
171 | </a> | 154 | </a> |
172 | <a href="#"> | 155 | <a href="#"> |
173 | <img src="images/logos/18.jpg" alt=""> | 156 | <img src="images/logos/18.jpg" alt=""> |
174 | </a> | 157 | </a> |
175 | </div> | 158 | </div> |
176 | </div> | 159 | </div> |
177 | <div class="swiper-slide"> | 160 | <div class="swiper-slide"> |
178 | <div class="employer__item"> | 161 | <div class="employer__item"> |
179 | <a href="#"> | 162 | <a href="#"> |
180 | <img src="images/logos/3.jpg" alt=""> | 163 | <img src="images/logos/3.jpg" alt=""> |
181 | </a> | 164 | </a> |
182 | <a href="#"> | 165 | <a href="#"> |
183 | <img src="images/logos/7.jpg" alt=""> | 166 | <img src="images/logos/7.jpg" alt=""> |
184 | </a> | 167 | </a> |
185 | <a href="#"> | 168 | <a href="#"> |
186 | <img src="images/logos/11.jpg" alt=""> | 169 | <img src="images/logos/11.jpg" alt=""> |
187 | </a> | 170 | </a> |
188 | <a href="#"> | 171 | <a href="#"> |
189 | <img src="images/logos/15.jpg" alt=""> | 172 | <img src="images/logos/15.jpg" alt=""> |
190 | </a> | 173 | </a> |
191 | <a href="#"> | 174 | <a href="#"> |
192 | <img src="images/logos/19.jpg" alt=""> | 175 | <img src="images/logos/19.jpg" alt=""> |
193 | </a> | 176 | </a> |
194 | </div> | 177 | </div> |
195 | </div> | 178 | </div> |
196 | <div class="swiper-slide"> | 179 | <div class="swiper-slide"> |
197 | <div class="employer__item"> | 180 | <div class="employer__item"> |
198 | <a href="#"> | 181 | <a href="#"> |
199 | <img src="images/logos/4.jpg" alt=""> | 182 | <img src="images/logos/4.jpg" alt=""> |
200 | </a> | 183 | </a> |
201 | <a href="#"> | 184 | <a href="#"> |
202 | <img src="images/logos/8.jpg" alt=""> | 185 | <img src="images/logos/8.jpg" alt=""> |
203 | </a> | 186 | </a> |
204 | <a href="#"> | 187 | <a href="#"> |
205 | <img src="images/logos/12.jpg" alt=""> | 188 | <img src="images/logos/12.jpg" alt=""> |
206 | </a> | 189 | </a> |
207 | <a href="#"> | 190 | <a href="#"> |
208 | <img src="images/logos/16.jpg" alt=""> | 191 | <img src="images/logos/16.jpg" alt=""> |
209 | </a> | 192 | </a> |
210 | <a href="#"> | 193 | <a href="#"> |
211 | <img src="images/logos/20.jpg" alt=""> | 194 | <img src="images/logos/20.jpg" alt=""> |
212 | </a> | 195 | </a> |
213 | </div> | 196 | </div> |
214 | </div> | 197 | </div> |
215 | </div> | 198 | </div> |
216 | </div>--> | 199 | </div>--> |
217 | <!--<div class="employer__body"> | 200 | <!--<div class="employer__body"> |
218 | <a href="#"> | 201 | <a href="#"> |
219 | <img src="images/logos/1.jpg" alt=""> | 202 | <img src="images/logos/1.jpg" alt=""> |
220 | </a> | 203 | </a> |
221 | <a href="#"> | 204 | <a href="#"> |
222 | <img src="images/logos/2.jpg" alt=""> | 205 | <img src="images/logos/2.jpg" alt=""> |
223 | </a> | 206 | </a> |
224 | <a href="#"> | 207 | <a href="#"> |
225 | <img src="images/logos/3.jpg" alt=""> | 208 | <img src="images/logos/3.jpg" alt=""> |
226 | </a> | 209 | </a> |
227 | <a href="#"> | 210 | <a href="#"> |
228 | <img src="images/logos/4.jpg" alt=""> | 211 | <img src="images/logos/4.jpg" alt=""> |
229 | </a> | 212 | </a> |
230 | <a href="#"> | 213 | <a href="#"> |
231 | <img src="images/logos/5.jpg" alt=""> | 214 | <img src="images/logos/5.jpg" alt=""> |
232 | </a> | 215 | </a> |
233 | <a href="#"> | 216 | <a href="#"> |
234 | <img src="images/logos/6.jpg" alt=""> | 217 | <img src="images/logos/6.jpg" alt=""> |
235 | </a> | 218 | </a> |
236 | <a href="#"> | 219 | <a href="#"> |
237 | <img src="images/logos/7.jpg" alt=""> | 220 | <img src="images/logos/7.jpg" alt=""> |
238 | </a> | 221 | </a> |
239 | <a href="#"> | 222 | <a href="#"> |
240 | <img src="images/logos/8.jpg" alt=""> | 223 | <img src="images/logos/8.jpg" alt=""> |
241 | </a> | 224 | </a> |
242 | <a href="#"> | 225 | <a href="#"> |
243 | <img src="images/logos/9.jpg" alt=""> | 226 | <img src="images/logos/9.jpg" alt=""> |
244 | </a> | 227 | </a> |
245 | <a href="#"> | 228 | <a href="#"> |
246 | <img src="images/logos/10.jpg" alt=""> | 229 | <img src="images/logos/10.jpg" alt=""> |
247 | </a> | 230 | </a> |
248 | <a href="#"> | 231 | <a href="#"> |
249 | <img src="images/logos/11.jpg" alt=""> | 232 | <img src="images/logos/11.jpg" alt=""> |
250 | </a> | 233 | </a> |
251 | <a href="#"> | 234 | <a href="#"> |
252 | <img src="images/logos/12.jpg" alt=""> | 235 | <img src="images/logos/12.jpg" alt=""> |
253 | </a> | 236 | </a> |
254 | <a href="#"> | 237 | <a href="#"> |
255 | <img src="images/logos/13.jpg" alt=""> | 238 | <img src="images/logos/13.jpg" alt=""> |
256 | </a> | 239 | </a> |
257 | <a href="#"> | 240 | <a href="#"> |
258 | <img src="images/logos/14.jpg" alt=""> | 241 | <img src="images/logos/14.jpg" alt=""> |
259 | </a> | 242 | </a> |
260 | <a href="#"> | 243 | <a href="#"> |
261 | <img src="images/logos/15.jpg" alt=""> | 244 | <img src="images/logos/15.jpg" alt=""> |
262 | </a> | 245 | </a> |
263 | <a href="#"> | 246 | <a href="#"> |
264 | <img src="images/logos/16.jpg" alt=""> | 247 | <img src="images/logos/16.jpg" alt=""> |
265 | </a> | 248 | </a> |
266 | <a href="#"> | 249 | <a href="#"> |
267 | <img src="images/logos/17.jpg" alt=""> | 250 | <img src="images/logos/17.jpg" alt=""> |
268 | </a> | 251 | </a> |
269 | <a href="#"> | 252 | <a href="#"> |
270 | <img src="images/logos/18.jpg" alt=""> | 253 | <img src="images/logos/18.jpg" alt=""> |
271 | </a> | 254 | </a> |
272 | <a href="#"> | 255 | <a href="#"> |
273 | <img src="images/logos/19.jpg" alt=""> | 256 | <img src="images/logos/19.jpg" alt=""> |
274 | </a> | 257 | </a> |
275 | <a href="#"> | 258 | <a href="#"> |
276 | <img src="images/logos/20.jpg" alt=""> | 259 | <img src="images/logos/20.jpg" alt=""> |
277 | </a> | 260 | </a> |
278 | </div>--> | 261 | </div>--> |
279 | 262 | ||
280 | <div class="employer__body"> | 263 | <div class="employer__body"> |
281 | @if ($employers->count()) | 264 | @if ($employers->count()) |
282 | @foreach($employers as $emp) | 265 | @foreach($employers as $emp) |
283 | @if (!empty($emp->employer->logo)) | 266 | @if (!empty($emp->employer->logo)) |
284 | <a href="{{ route('info_company', ['company' => $emp->employer->id]) }}"> | 267 | <a href="{{ route('info_company', ['company' => $emp->employer->id]) }}"> |
285 | <img src="{{ asset(Storage::url($emp->employer->logo)) }}" alt="{{ $emp->employer->name_company }}"> | 268 | <img src="{{ asset(Storage::url($emp->employer->logo)) }}" alt="{{ $emp->employer->name_company }}"> |
286 | </a> | 269 | </a> |
287 | @else | 270 | @else |
288 | <a href="{{ route('info_company', ['company' => $emp->employer->id]) }}"> | 271 | <a href="{{ route('info_company', ['company' => $emp->employer->id]) }}"> |
289 | <img src="{{ asset('images/logo_emp.png') }}" alt="{{ $emp->employer->name_company }}"> | 272 | <img src="{{ asset('images/logo_emp.png') }}" alt="{{ $emp->employer->name_company }}"> |
290 | </a> | 273 | </a> |
291 | @endif | 274 | @endif |
292 | @endforeach | 275 | @endforeach |
293 | @else | 276 | @else |
294 | <h5>Тут нет никаких записей</h5> | 277 | <h5>Тут нет никаких записей</h5> |
295 | @endif | 278 | @endif |
296 | </div> | 279 | </div> |
297 | <!--if ($employers->count()) | 280 | <!--if ($employers->count()) |
298 | php | 281 | php |
299 | $rec = 0; | 282 | $rec = 0; |
300 | $count = $employers->count(); | 283 | $count = $employers->count(); |
301 | 284 | ||
302 | endphp | 285 | endphp |
303 | 286 | ||
304 | foreach($employers as $emp) | 287 | foreach($employers as $emp) |
305 | php $rec++ endphp | 288 | php $rec++ endphp |
306 | if (($rec==1) || ($rec==5) || ($rec==9) || ($rec==13) || ($rec==17)) | 289 | if (($rec==1) || ($rec==5) || ($rec==9) || ($rec==13) || ($rec==17)) |
307 | <div class="swiper-slide"> | 290 | <div class="swiper-slide"> |
308 | <div class="employer__item"> | 291 | <div class="employer__item"> |
309 | endif | 292 | endif |
310 | if (!empty($emp->employer->logo)) | 293 | if (!empty($emp->employer->logo)) |
311 | <a href=" route('ad-employer', ['ad_employer' => $emp->employer->id]) }}"> | 294 | <a href=" route('ad-employer', ['ad_employer' => $emp->employer->id]) }}"> |
312 | <img src=" asset(Storage::url($emp->employer->logo)) }}" alt=" $emp->employer->name_company }}"> | 295 | <img src=" asset(Storage::url($emp->employer->logo)) }}" alt=" $emp->employer->name_company }}"> |
313 | </a> | 296 | </a> |
314 | else | 297 | else |
315 | <a href=" route('ad-employer', ['ad_employer' => $emp->employer->id]) }}"> | 298 | <a href=" route('ad-employer', ['ad_employer' => $emp->employer->id]) }}"> |
316 | <img src=" asset('images/logo_emp.png') }}" alt=" $emp->employer->name_company }}"> | 299 | <img src=" asset('images/logo_emp.png') }}" alt=" $emp->employer->name_company }}"> |
317 | </a> | 300 | </a> |
318 | endif | 301 | endif |
319 | if (($rec==4) || ($rec==8) || ($rec==12) || ($rec==16) || ($rec==20) || ($rec == $count)) | 302 | if (($rec==4) || ($rec==8) || ($rec==12) || ($rec==16) || ($rec==20) || ($rec == $count)) |
320 | </div> | 303 | </div> |
321 | </div> | 304 | </div> |
322 | endif | 305 | endif |
323 | endforeach | 306 | endforeach |
324 | else | 307 | else |
325 | <h5>Тут нет никаких записей</h5> | 308 | <h5>Тут нет никаких записей</h5> |
326 | endif--> | 309 | endif--> |
327 | </div> | 310 | </div> |
328 | <div class="swiper-pagination"></div> | 311 | <div class="swiper-pagination"></div> |
329 | </div> | 312 | </div> |
330 | <a href="{{ route('shipping_companies') }}" class="employer__more button button_light">Все работодатели</a> | 313 | <a href="{{ route('shipping_companies') }}" class="employer__more button button_light">Все работодатели</a> |
331 | </div> | 314 | </div> |
332 | </section> | 315 | </section> |
333 | <section class="about"> | 316 | <section class="about"> |
334 | <div class="container"> | 317 | <div class="container"> |
335 | <div class="about__wrapper"> | 318 | <div class="about__wrapper"> |
336 | <div class="title about__title"><h4>О нас</h4></div> | 319 | <div class="title about__title"><h4>О нас</h4></div> |
337 | <div class="about__body"> | 320 | <div class="about__body"> |
338 | <div class="about__line"></div> | 321 | <div class="about__line"></div> |
339 | <div class="about__item"> | 322 | <div class="about__item"> |
340 | <b>Для работодателей</b> | 323 | <b>Для работодателей</b> |
341 | <span>Наш ресурс позволит Вам за демократичную цену найти нужных специалистов в кратчайшие | 324 | <span>Наш ресурс позволит Вам за демократичную цену найти нужных специалистов в кратчайшие |
342 | сроки, подробнее об условиях можно узнать <a href="{{ route('page', ['pages' => 'Stoimost-razmescheniya']) }}">здесь</a>.</span> | 325 | сроки, подробнее об условиях можно узнать <a href="{{ route('page', ['pages' => 'Stoimost-razmescheniya']) }}">здесь</a>.</span> |
343 | <a class="about__button button button_whited" style="text-decoration: none" href="{{ route('bd_resume') }}">Поиск сотрудников</a> | 326 | <a class="about__button button button_whited" style="text-decoration: none" href="{{ route('bd_resume') }}">Поиск сотрудников</a> |
344 | </div> | 327 | </div> |
345 | <div class="about__item"> | 328 | <div class="about__item"> |
346 | <b>Для сотрудников</b> | 329 | <b>Для сотрудников</b> |
347 | <span>Наше преимущество — это большой объем вакансий, более 70 судоходных компаний России и | 330 | <span>Наше преимущество — это большой объем вакансий, более 70 судоходных компаний России и |
348 | СНГ ищут сотрудников через наши ресурсы</span> | 331 | СНГ ищут сотрудников через наши ресурсы</span> |
349 | <a class="about__button button button_whited" style="text-decoration: none" href="{{ route('vacancies') }}">Ищу работу</a> | 332 | <a class="about__button button button_whited" style="text-decoration: none" href="{{ route('vacancies') }}">Ищу работу</a> |
350 | </div> | 333 | </div> |
351 | </div> | 334 | </div> |
352 | </div> | 335 | </div> |
353 | </div> | 336 | </div> |
354 | </section> | 337 | </section> |
355 | 338 | ||
356 | @if ($news->count()) | 339 | @if ($news->count()) |
357 | <section class="news"> | 340 | <section class="news"> |
358 | <div class="container"> | 341 | <div class="container"> |
359 | <div class="news__toper"> | 342 | <div class="news__toper"> |
360 | <div class="title"><h4>Новости и статьи</h4></div> | 343 | <div class="title"><h4>Новости и статьи</h4></div> |
361 | <div class="navs"> | 344 | <div class="navs"> |
362 | <button class="js-news-swiper-button-prev"> | 345 | <button class="js-news-swiper-button-prev"> |
363 | <svg class="rotate180"> | 346 | <svg class="rotate180"> |
364 | <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use> | 347 | <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use> |
365 | </svg> | 348 | </svg> |
366 | </button> | 349 | </button> |
367 | <button class="js-news-swiper-button-next"> | 350 | <button class="js-news-swiper-button-next"> |
368 | <svg> | 351 | <svg> |
369 | <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use> | 352 | <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use> |
370 | </svg> | 353 | </svg> |
371 | </button> | 354 | </button> |
372 | </div> | 355 | </div> |
373 | </div> | 356 | </div> |
374 | 357 | ||
375 | <div class="swiper js-news-swiper"> | 358 | <div class="swiper js-news-swiper"> |
376 | <div class="swiper-wrapper"> | 359 | <div class="swiper-wrapper"> |
377 | 360 | ||
378 | @foreach ($news as $new) | 361 | @foreach ($news as $new) |
379 | <div class="swiper-slide"> | 362 | <div class="swiper-slide"> |
380 | <div class="news__item"> | 363 | <div class="news__item"> |
381 | @if (empty($new->image)) | 364 | @if (empty($new->image)) |
382 | <img src="{{ asset('/images/default_ship.jpg') }}" alt="" class="news__item-pic"> | 365 | <img src="{{ asset('/images/default_ship.jpg') }}" alt="" class="news__item-pic"> |
383 | @else | 366 | @else |
384 | <img src="{{ asset(Storage::url($new->image)) }}" alt="" class="news__item-pic"> | 367 | <img src="{{ asset(Storage::url($new->image)) }}" alt="" class="news__item-pic"> |
385 | @endif | 368 | @endif |
386 | <div class="news__item-body"> | 369 | <div class="news__item-body"> |
387 | <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> | 370 | <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> |
388 | <span class="news__item-title">{{ $new->title }}</span> | 371 | <span class="news__item-title">{{ $new->title }}</span> |
389 | <span class="news__item-text">{!! mb_strimwidth($new->text, 0, 100) !!}</span> | 372 | <span class="news__item-text">{!! mb_strimwidth($new->text, 0, 100) !!}</span> |
390 | <a href="{{ route('detail_new', ['new' => $new->id]) }}" class="news__item-more button button_light">Читать далее</a> | 373 | <a href="{{ route('detail_new', ['new' => $new->id]) }}" class="news__item-more button button_light">Читать далее</a> |
391 | </div> | 374 | </div> |
392 | </div> | 375 | </div> |
393 | </div> | 376 | </div> |
394 | @endforeach | 377 | @endforeach |
395 | 378 | ||
396 | </div> | 379 | </div> |
397 | <div class="swiper-pagination"></div> | 380 | <div class="swiper-pagination"></div> |
398 | </div> | 381 | </div> |
399 | <a href="{{ route('news') }}" class="news__all button button_light">Все новости</a> | 382 | <a href="{{ route('news') }}" class="news__all button button_light">Все новости</a> |
400 | 383 | ||
401 | </div> | 384 | </div> |
402 | </section> | 385 | </section> |
403 | @endif | 386 | @endif |
404 | 387 | ||
405 | <section class="info"> | 388 | <section class="info"> |
406 | <div class="container"> | 389 | <div class="container"> |
407 | <img src="images/5.png" alt="" class="info__pic"> | 390 | <img src="images/5.png" alt="" class="info__pic"> |
408 | <div class="info__body"> | 391 | <div class="info__body"> |
409 | <div class="title info__title"><h4>Мы в социальных сетях</h4></div> | 392 | <div class="title info__title"><h4>Мы в социальных сетях</h4></div> |
410 | <div class="info__item"> | 393 | <div class="info__item"> |
411 | <div class="info__text">Телеграм — Подпишитесь на наш телеграм канал и получайте уведомления о | 394 | <div class="info__text">Телеграм — Подпишитесь на наш телеграм канал и получайте уведомления о |
412 | новых вакансиях прямо на свой смартфон</div> | 395 | новых вакансиях прямо на свой смартфон</div> |
413 | <a href="{{ $companies[0]->telegram }}" class="info__link" style="background:#20A0E1"> | 396 | <a href="{{ $companies[0]->telegram }}" class="info__link" style="background:#20A0E1"> |
414 | <svg> | 397 | <svg> |
415 | <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> | 398 | <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> |
416 | </svg> | 399 | </svg> |
417 | Телеграм | 400 | Телеграм |
418 | </a> | 401 | </a> |
419 | </div> | 402 | </div> |
420 | <div class="info__item"> | 403 | <div class="info__item"> |
421 | <div class="info__text">ВКонтакте — Лучшие вакансии за неделю выкладываем именно тут, информация | 404 | <div class="info__text">ВКонтакте — Лучшие вакансии за неделю выкладываем именно тут, информация |
422 | о судоходных компаниях, инструкции по работе с сайтом, конкурсы и многое другое</div> | 405 | о судоходных компаниях, инструкции по работе с сайтом, конкурсы и многое другое</div> |
423 | <a href="{{ $companies[0]->vkontact }}" class="info__link" style="background:#2787F5"> | 406 | <a href="{{ $companies[0]->vkontact }}" class="info__link" style="background:#2787F5"> |
424 | <svg> | 407 | <svg> |
425 | <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> | 408 | <use xlink:href="{{ asset('images/sprite.svg#vk') }}"></use> |
426 | </svg> | 409 | </svg> |
427 | ВКонтакте | 410 | ВКонтакте |
428 | </a> | 411 | </a> |
429 | </div> | 412 | </div> |
430 | </div> | 413 | </div> |
431 | </div> | 414 | </div> |
432 | </section> | 415 | </section> |
433 | @endsection | 416 | @endsection |
434 | 417 |
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 | @if ($slug == 'Usloviya-razmescheniya') | ||
20 | <div class="thing__buttons"> | ||
21 | <a href="{{ route('shipping_companies') }}" class="button">Список компаний</a> | ||
22 | </div> | ||
23 | @endif | ||
19 | </div> | 24 | </div> |
20 | </div> | 25 | </div> |
21 | </section> | 26 | </section> |
22 | @if ($page->slug !== 'Usloviya-razmescheniya') | 27 | @if ($page->slug !== 'Usloviya-razmescheniya') |
23 | <main class="main"> | 28 | <main class="main"> |
24 | <div class="container"> | 29 | <div class="container"> |
25 | <div class="main__content"> | 30 | <div class="main__content"> |
26 | <div class="main__content-item"> | 31 | <div class="main__content-item"> |
27 | {!! $page->text !!} | 32 | {!! $page->text !!} |
28 | </div> | 33 | </div> |
29 | </div> | 34 | </div> |
30 | </div> | 35 | </div> |
31 | </main> | 36 | </main> |
32 | @else | 37 | @else |
33 | <main class="main"> | 38 | <main class="main"> |
34 | <div class="container"> | 39 | <div class="container"> |
35 | <div class="main__cond"> | 40 | <div class="main__cond"> |
36 | <div class="main__cond-label"> | 41 | <div class="main__cond-label"> |
37 | На рынке мы с 2020 года. | 42 | На рынке мы с 2020 года. |
38 | <br>Мы молодая компания, которой важно сделать хороший и востребованный продукт! | 43 | <br>Мы молодая компания, которой важно сделать хороший и востребованный продукт! |
39 | </div> | 44 | </div> |
40 | <div> | 45 | <div> |
41 | <h3>За это время нам удалось:</h3> | 46 | <h3>За это время нам удалось:</h3> |
42 | <ul class="main__cond-icons"> | 47 | <ul class="main__cond-icons"> |
43 | <li> | 48 | <li> |
44 | <span><img src="{{ asset('images/svg/1.svg') }}" alt=""></span> | 49 | <span><img src="{{ asset('images/svg/1.svg') }}" alt=""></span> |
45 | Создать самое крупное сообщество Вконтакте по поиску работы на речноми морском флоте | 50 | Создать самое крупное сообщество Вконтакте по поиску работы на речноми морском флоте |
46 | </li> | 51 | </li> |
47 | <li> | 52 | <li> |
48 | <span><img src="{{ asset('images/svg/2.svg') }}" alt=""></span> | 53 | <span><img src="{{ asset('images/svg/2.svg') }}" alt=""></span> |
49 | Создать самый крупный телеграм канал по поиску работы на речноми морском флоте | 54 | Создать самый крупный телеграм канал по поиску работы на речноми морском флоте |
50 | </li> | 55 | </li> |
51 | <li> | 56 | <li> |
52 | <span><img src="{{ asset('images/svg/3.svg') }}" alt=""></span> | 57 | <span><img src="{{ asset('images/svg/3.svg') }}" alt=""></span> |
53 | Создать действительно эффективную и удобную базу анкет | 58 | Создать действительно эффективную и удобную базу анкет |
54 | </li> | 59 | </li> |
55 | <li> | 60 | <li> |
56 | <span><img src="{{ asset('images/svg/4.svg') }}" alt=""></span> | 61 | <span><img src="{{ asset('images/svg/4.svg') }}" alt=""></span> |
57 | Разместить свою рекламу во многих учебных заведениях нашей страны. Колледжи,вузы, утц, медицинские центры охотно размещают нашу рекламу в своих заведениях | 62 | Разместить свою рекламу во многих учебных заведениях нашей страны. Колледжи,вузы, утц, медицинские центры охотно размещают нашу рекламу в своих заведениях |
58 | </li> | 63 | </li> |
59 | <li> | 64 | <li> |
60 | <span><img src="{{ asset('images/svg/5.svg') }}" alt=""></span> | 65 | <span><img src="{{ asset('images/svg/5.svg') }}" alt=""></span> |
61 | Подключить к нашему сервису более 120 судоходных компаний России | 66 | Подключить к нашему сервису более 120 судоходных компаний России |
62 | </li> | 67 | </li> |
63 | <li> | 68 | <li> |
64 | <span><img src="{{ asset('images/svg/6.svg') }}" alt=""></span> | 69 | <span><img src="{{ asset('images/svg/6.svg') }}" alt=""></span> |
65 | Оправдать доверие и ожидание, так как компании заключившие с нами договорв первый раз в 95% случаев остаются довольны сотрудничеством и продлевают договор | 70 | Оправдать доверие и ожидание, так как компании заключившие с нами договорв первый раз в 95% случаев остаются довольны сотрудничеством и продлевают договор |
66 | </li> | 71 | </li> |
67 | </ul> | 72 | </ul> |
68 | </div> | 73 | </div> |
69 | <div> | 74 | <div> |
70 | <h3>Форма обратной связи</h3> | 75 | <h3>Форма обратной связи</h3> |
71 | <p>Все поля обязательны для заполнения.</p> | 76 | <p>Все поля обязательны для заполнения.</p> |
72 | <form class="callback main__cond-callback" method="POST" action="{{ route('form_feedback') }}"> | 77 | <form class="callback main__cond-callback" method="POST" action="{{ route('form_feedback') }}"> |
73 | @csrf | 78 | @csrf |
74 | <div class="callback__body"> | 79 | <div class="callback__body"> |
75 | <input type="text" class="input" name="name" id="name" placeholder="Ваше имя" value="{{ old('name') ?? '' }}" required=""> | 80 | <input type="text" class="input" name="name" id="name" placeholder="Ваше имя" value="{{ old('name') ?? '' }}" required=""> |
76 | @error('name') | 81 | @error('name') |
77 | <span class="text-xs text-red-600"> | 82 | <span class="text-xs text-red-600"> |
78 | {{ $message }} | 83 | {{ $message }} |
79 | </span> | 84 | </span> |
80 | @enderror | 85 | @enderror |
81 | <input type="text" class="input" name="name_company" id="name_company" value="{{ old('name_company') ?? '' }}" placeholder="Название судоходной компании" required=""> | 86 | <input type="text" class="input" name="name_company" id="name_company" value="{{ old('name_company') ?? '' }}" placeholder="Название судоходной компании" required=""> |
82 | @error('name_company') | 87 | @error('name_company') |
83 | <span class="text-xs text-red-600"> | 88 | <span class="text-xs text-red-600"> |
84 | {{ $message }} | 89 | {{ $message }} |
85 | </span> | 90 | </span> |
86 | @enderror | 91 | @enderror |
87 | <input type="tel" class="input" name="telephone" id="telephone" value="{{ old('teelphone') ?? '' }}" placeholder="Телефон" required=""> | 92 | <input type="tel" class="input" name="telephone" id="telephone" value="{{ old('teelphone') ?? '' }}" placeholder="Телефон" required=""> |
88 | @error('telephone') | 93 | @error('telephone') |
89 | <span class="text-xs text-red-600"> | 94 | <span class="text-xs text-red-600"> |
90 | {{ $message }} | 95 | {{ $message }} |
91 | </span> | 96 | </span> |
92 | @enderror | 97 | @enderror |
93 | <input type="email" class="input" name="email" id="email" value="{{ old('email') ?? '' }}" placeholder="Электронная почта" required=""> | 98 | <input type="email" class="input" name="email" id="email" value="{{ old('email') ?? '' }}" placeholder="Электронная почта" required=""> |
94 | @error('email') | 99 | @error('email') |
95 | <span class="text-xs text-red-600"> | 100 | <span class="text-xs text-red-600"> |
96 | {{ $message }} | 101 | {{ $message }} |
97 | </span> | 102 | </span> |
98 | @enderror | 103 | @enderror |
99 | </div> | 104 | </div> |
100 | <textarea class="textarea callback__textarea" name="text" id="text" placeholder="Текст сообщения" required="">{{ old('text') ?? '' }}</textarea> | 105 | <textarea class="textarea callback__textarea" name="text" id="text" placeholder="Текст сообщения" required="">{{ old('text') ?? '' }}</textarea> |
101 | <div class="callback__bottom"> | 106 | <div class="callback__bottom"> |
102 | <label class="checkbox"> | 107 | <label class="checkbox"> |
103 | <input type="checkbox" name="politik" id="politik" class="checkbox__input" required=""> | 108 | <input type="checkbox" name="politik" id="politik" class="checkbox__input" required=""> |
104 | <span class="checkbox__icon"> | 109 | <span class="checkbox__icon"> |
105 | <svg> | 110 | <svg> |
106 | <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use> | 111 | <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use> |
107 | </svg> | 112 | </svg> |
108 | </span> | 113 | </span> |
109 | <span class="checkbox__text"> | 114 | <span class="checkbox__text"> |
110 | <span> | 115 | <span> |
111 | Я согласен(на) с | 116 | Я согласен(на) с |
112 | <a href="{{ route('page', ['pages' => 'Politika-konfidencialnosti']) }}">Политикой конфиденциальности</a> | 117 | <a href="{{ route('page', ['pages' => 'Politika-konfidencialnosti']) }}">Политикой конфиденциальности</a> |
113 | </span> | 118 | </span> |
114 | </span> | 119 | </span> |
115 | @error('politik') | 120 | @error('politik') |
116 | <span class="text-xs text-red-600"> | 121 | <span class="text-xs text-red-600"> |
117 | {{ $message }} | 122 | {{ $message }} |
118 | </span> | 123 | </span> |
119 | @enderror | 124 | @enderror |
120 | </label> | 125 | </label> |
121 | <button type="submit" class="button">Отправить</button> | 126 | <button type="submit" class="button">Отправить</button> |
122 | </div> | 127 | </div> |
123 | </form> | 128 | </form> |
124 | </div> | 129 | </div> |
125 | </div> | 130 | </div> |
126 | </div> | 131 | </div> |
127 | </main> | 132 | </main> |
128 | @endif | 133 | @endif |
129 | </div> | 134 | </div> |
130 | @endsection | 135 | @endsection |
131 | 136 |