Add job filtering and search functionality with experience level#5
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds job search/filtering support around experience levels and location reference data, extending candidate job discovery APIs.
Changes:
- Adds
ExperienceLevelenum,experience_leveljob column, model casting/fillable support, and job response fields. - Adds
Locationmodel, migration, and seeder for autocomplete/reference data. - Introduces search routes and
SearchControllerendpoints for filtered job search and location lookup.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
routes/api.php |
Registers public location search and candidate job search routes. |
database/seeders/LocationSeeder.php |
Seeds location reference data. |
database/seeders/DatabaseSeeder.php |
Adds location seeding to the main seed flow. |
database/migrations/2026_05_30_200002_create_locations_table.php |
Creates the locations reference table. |
database/migrations/2026_05_30_200001_add_experience_level_to_job_listings.php |
Adds nullable job experience level storage. |
app/Models/Location.php |
Adds the Eloquent model for locations. |
app/Models/Job.php |
Adds experience level to fillable fields and enum casts. |
app/Http/Controllers/Search/SearchController.php |
Adds job search/filtering and location autocomplete responses. |
app/Http/Controllers/Api/V1/JobController.php |
Extends candidate job listing/search responses with filtering, sorting, pagination, and experience level. |
app/Enums/ExperienceLevel.php |
Defines supported job experience level values. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+99
to
+100
| 'company_name' => $job->employer?->employerProfile?->company_name ?? 'Unknown', | ||
| 'logo_url' => $job->employer?->employerProfile?->logo_url, |
Comment on lines
+68
to
+70
| if ($dateFrom = $request->input('date_from')) { | ||
| $query->whereDate('created_at', '>=', $dateFrom); | ||
| } |
| protected $fillable = [ | ||
| 'employer_id', 'title', 'description', 'requirements', | ||
| 'salary_range', 'work_type', 'location', 'category_id', | ||
| 'salary_range', 'work_type', 'location', 'experience_level', 'category_id', |
khaledfahmy123
approved these changes
May 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds support for job experience level and location reference data, and introduces a new, flexible job search API with advanced filtering and autocomplete functionality. The changes include a new
ExperienceLevelenum, updates to theJobmodel and migrations to support experience levels, a newLocationmodel and seed data, and a newSearchControllerfor robust job and location search endpoints.Job Experience Level Support:
ExperienceLevelenum and integrated it into theJobmodel, including attribute casting and making it fillable. A migration was added to include theexperience_levelcolumn in thejob_listingstable. [1] [2] [3] [4] [5]JobControllerto include theexperience_levelfield. [1] [2]Location Reference Data:
Locationmodel, migration, and seeder to provide a reference list of locations for autocomplete and filtering. The seeder includes major cities and remote options. [1] [2] [3] [4]Advanced Job Search API:
SearchControllerwith ajobsendpoint that supports keyword search, filtering by experience level, location (partial match), work type, category (by slug or ID), date posted, and sorting. Results include detailed job and employer info.locationsendpoint to provide a list of locations for autocomplete.API Routes:
routes/api.php. [1] [2]Job Listing Query Improvements:
JobController@indexto support keyword search, experience level filter, and sorting, aligning it with the new search capabilities. [1] [2]