RESTful API for managing employees with Laravel and Laravel Sanctum authentication.
git clone <repository-url>
cd primeo
composer install./vendor/bin/sail up -d
./vendor/bin/sail artisan migrate:fresh --seed
./vendor/bin/sail artisan scribe:generate- Active:
[email protected]/password123(can login) - Inactive:
[email protected]/password123(login blocked)
- Interactive docs:
http://localhost/docs - Base URL:
http://localhost/api
# Run all tests
./vendor/bin/sail artisan test
# Run specific test file
./vendor/bin/sail artisan test tests/Feature/AuthLoginTest.php
# Run with coverage
./vendor/bin/sail artisan test --coverage- Import
postman/Employee_Management_API.postman_collection.json - Import
postman/Employee_Management_Environment.postman_environment.json - Set environment as active
- Individual: Start with "Login - Active Employee" to set token
- Collection: Right-click → "Run collection"
curl -X POST http://localhost/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email": "[email protected]", "password": "password123"}'# Public endpoint
curl "http://localhost/api/employees"
# Protected endpoint (replace TOKEN)
curl -X GET http://localhost/api/me \
-H "Authorization: Bearer TOKEN"GET /api/employees- List employees (with filtering, sorting, pagination)
POST /api/auth/login- LoginPOST /api/auth/forgot-password- Request password resetPOST /api/auth/reset-password- Reset password
POST /api/employees- Create employeeGET /api/employees/{id}- Get employee detailsPUT /api/employees/{id}- Update employeeDELETE /api/employees/{id}- Delete employeeDELETE /api/employees/bulk- Bulk deleteGET /api/me- Current user info
# Reset database with test data
./vendor/bin/sail artisan migrate:fresh --seed
# Check code style
./vendor/bin/sail composer ecs
# Generate API docs
./vendor/bin/sail artisan scribe:generate
# View logs
./vendor/bin/sail artisan tail# Restart containers
./vendor/bin/sail down && ./vendor/bin/sail up -d
# Clear caches
./vendor/bin/sail artisan optimize:clear
# Check container status
./vendor/bin/sail psAll content in this repository is licensed under a CC BY-NC-SA 4.0.
- Framework: Laravel 12.x
- Authentication: Laravel Sanctum (API tokens)
- Database: MySQL with Eloquent ORM
- Documentation: Scribe
- Testing: PHPUnit + Postman
- Code Style: Easy Coding Standard (ECS)
