Laravel 12 + Filament: Automating Payroll for 24+ Employees
A practical walkthrough of building an internal payroll system that reduced manual prep by 80%.
Context
During my internship at Valiant Allied Services, Inc., the team managed payroll for 24+ employees across 3 vessel-based branches using spreadsheets. The process was manual, error-prone, and consumed hours each pay period. I was tasked with replacing it with an automated system.
The Problem
- ▸Manual calculations for 24+ employees took 4+ hours per pay period
- ▸Philippine statutory deductions (SSS, PhilHealth, Pag-IBIG, TRAIN) had to be computed by hand
- ▸No centralized employee records — data lived in disconnected files
- ▸Generating payslips and reports required copy-pasting between sheets
The Solution
Built a Laravel 12 + Filament admin panel with three core modules:
- ▸Employee Management — centralized records, branch assignment, role-based access
- ▸Payroll Engine — configurable rules for basic pay, allowances, overtime, and statutory deductions
- ▸Reporting — PDF payslip generation, Excel import/export, monthly summaries
Key Technical Decisions
Filament over custom admin — saved weeks of CRUD scaffolding; resources, tables, forms, and actions handled declaratively
Payroll calculation as a service class — PayrollService::compute($employee) keeps logic testable and isolated from HTTP layer
Statutory deductions as config-driven rules — SSS/PhilHealth/Pag-IBIG contribution tables stored in DB, versioned per year; TRAIN tax brackets applied via lookup
80+ PHPUnit tests — feature tests for payroll scenarios (regular, overtime, absent, multiple allowances) + unit tests for deduction math; SQLite in-memory for speed
Docker dev environment — Nginx + PHP-FPM + MySQL matching production; no 'works on my machine' drift
Impact
| Metric | Result |
|---|---|
| Prep Time Reduction | 80% |
| Employees Supported | 24+ |
| Branches Covered | 3 |
| PHPUnit Tests | 80+ |
| Statutory Deductions | SSS, PhilHealth, Pag-IBIG, TRAIN |
Technology Stack
| Layer | Technology |
|---|---|
| Backend | Laravel 12 / PHP 8.2 |
| Admin Interface | Filament v5 |
| Database | MySQL 8.0 |
| Frontend | Livewire / Alpine.js / Tailwind CSS |
| Testing | PHPUnit / SQLite in-memory |
| Container | Docker / Alpine / Nginx / PHP-FPM |
| CI | GitHub Actions |