A Laravel 12 RESTful API for job listings and applications. Users can browse and apply for jobs, while admins can manage job posts and application statuses.
- 🔐 User authentication (register/login)
- 🧑💼 Role-based access (Admin & User)
- 📋 Job CRUD (Admin only)
- 📩 Apply to jobs (User only, one-time per job)
- ✉️ Email notification when application is accepted
- 🧾 Application logging
- ✅ Feature Testing and unit testing
- 📖 API Documentation included
- PHP 8.2+
- Laravel 12
- MySQL
- Composer
- Gmail SMTP for email testing
git clone https://github.com/your-username/job-manager-api.git
cd job-manager-api
composer install
cp .env.example .env
php artisan key:generate
Set your DB credentials and email settings:
DB_DATABASE=job_manager
DB_USERNAME=root
DB_PASSWORD=
MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=[email protected]
MAIL_PASSWORD=uheghlynzmhvfgzr
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=[email protected]
MAIL_FROM_NAME="Job Manager"
php artisan migrate --seed
php artisan serve
Method | Endpoint | Description |
---|---|---|
POST | /api/register | Register new user |
POST | /api/login | Login user |
Method | Endpoint | Description |
---|---|---|
GET | /api/admin/jobs | List all jobs |
GET | /api/admin/jobs/{job} | Show specific job |
POST | /api/admin/jobs | Create a job |
PUT | /api/admin/jobs/{job} | Update job |
DELETE | /api/admin/jobs/{job} | Delete job |
GET | /api/admin/jobs/toggleStatus/{job} | View current status |
POST | /api/admin/jobs/toggleStatus/{job} | Toggle job status (active/inactive) |
Method | Endpoint | Description |
---|---|---|
GET | /api/admin/applications | View all applications |
GET | /api/admin/jobs/{id}/applications | Filter applications by job ID |
GET | /api/admin/applications/{application}/accept | Accept an application (send email) |
Method | Endpoint | Description |
---|---|---|
GET | /api/user/jobs | List all active jobs |
GET | /api/user/jobs/{job} | Show specific job |
GET | /api/user/jobs/filter | Filter jobs |
Method | Endpoint | Description |
---|---|---|
POST | /api/user/jobs/{job}/apply | Apply for a job |
GET | /api/user/applications | List my applications |
GET | /api/user/applications/{id} | View specific application |
DELETE | /api/user/applications/{id} | Delete application |
php artisan test
Every job update is logged for audit purposes. Example (in storage/logs/application.log):
[2025-07-21 12:13:39] local.INFO: Status updated successfully! {"old_status":"inactive","updated_status":"active"}
You can explore and test all endpoints using the Postman collection provided.
-
🌐 Online via Postman link:
Open in Postman Workspace -
📁 Locally in the project:
Navigate todocs/Job Manager.postman_collection.json
and import it manually into Postman.
Used to authorize admin/user requests easily in the collection.
Example email sent to a user when their job application is accepted.
Snapshot from running php artisan test
showing successful feature tests.
Developed by Tasnim Alshair
📫 Email: [email protected]
🔗 GitHub: github.com/tasnimalshair
🔗 LinkedIn: linkedin.com/in/tasnim-alshair-aa11a4266
📸 Instagram: instagram.com/dev.tasnimalshair
Feel free to reach out for collaborations, questions, or just to say hi!