Commit 7c475b9ed29c39e96fc1455b94fad178eab72eaa

Authored by Сергей П
1 parent 333b515354
Exists in master

правки

Showing 1 changed file with 10 additions and 8 deletions 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);