Skip to content

Commit

Permalink
removed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bymrbanks committed Sep 21, 2024
1 parent 1a01317 commit e7aec3d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions app/Http/Controllers/api/SalaryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function update(Request $request, $id)

public function destroy($id)
{
$salary = Salary::where('is_verified', true) // Only use verified forms
$salary = Salary::where('is_verified', true)
->findOrFail($id);
$salary->delete();

Expand All @@ -147,8 +147,7 @@ public function search(Request $request)
});
});
}

// Filters

if ($request->has('industry')) {
$query->where('industry_id', $request->industry);
}
Expand All @@ -161,12 +160,10 @@ public function search(Request $request)
$query->where('experience_id', $request->experience_level);
}

// Sorting
$sortField = $request->input('sort_by', 'created_at');
$sortDirection = $request->input('sort_direction', 'desc');
$query->orderBy($sortField, $sortDirection);

// Pagination
$perPage = $request->input('per_page', 15);
$salaries = $query->paginate($perPage);

Expand Down

0 comments on commit e7aec3d

Please sign in to comment.