Commit 7c7dcbe7f12a5846928ccc3051299a2cbd53e651
Exists in
master
Merge branch 'master' of http://gitlab.nologostudio.ru/alarionov/rekamore-su
Showing 1 changed file Side-by-side Diff
app/Http/Controllers/MainController.php
... | ... | @@ -188,14 +188,16 @@ class MainController extends Controller |
188 | 188 | else |
189 | 189 | $job_search = $request->get('job'); |
190 | 190 | |
191 | - $Query = Ad_employer::with('jobs')-> | |
192 | - with('cat')-> | |
193 | - with('employer')-> | |
194 | - whereHas('jobs_code', function ($query) use ($job_search) { | |
195 | - if (!empty($job_search)) { | |
196 | - $query->where('job_title_id', $job_search); | |
197 | - } | |
198 | - })->select('ad_employers.*'); | |
191 | + $Query = Ad_employer::with('jobs') | |
192 | + ->with('cat') | |
193 | + ->with('employer') | |
194 | + ->where('is_remove', 0) | |
195 | + ->whereHas('jobs_code', function ($query) use ($job_search) { | |
196 | + if (!empty($job_search)) { | |
197 | + $query->where('job_title_id', $job_search); | |
198 | + } | |
199 | + }) | |
200 | + ->select('ad_employers.*'); | |
199 | 201 | |
200 | 202 | if (isset($categories->id) && ($categories->id > 0)) { |
201 | 203 | $Query = $Query->where('category_id', '=', $categories->id); |