Skip to content
Irvine "Irvs" Clark B. EbajanIrvs
Back to WritingBackend

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 classPayrollService::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

MetricResult
Prep Time Reduction80%
Employees Supported24+
Branches Covered3
PHPUnit Tests80+
Statutory DeductionsSSS, PhilHealth, Pag-IBIG, TRAIN

Technology Stack

LayerTechnology
BackendLaravel 12 / PHP 8.2
Admin InterfaceFilament v5
DatabaseMySQL 8.0
FrontendLivewire / Alpine.js / Tailwind CSS
TestingPHPUnit / SQLite in-memory
ContainerDocker / Alpine / Nginx / PHP-FPM
CIGitHub Actions