r/PHP 11h ago

New dev building a Laravel + Postgres Attendance & Payroll system — need advice on deployment with strict company control

0 Upvotes

Hey everyone,

I recently joined a new company as a developer, and I’m building our internal Attendance and Payroll system using Laravel and PostgreSQL.

Development is going well, but I’m relatively new to deploying Laravel apps in production. I need some guidance on choosing the right hosting and database setup based on my company's requirements:

App Scope & Needs:

  • Core Features: Employee attendance tracking, HR management, and monthly payroll calculation/generation (PDFs, background processing).
  • Database: Currently using PostgreSQL in local development and plan to stick with it.
  • Company Requirement: Management wants full control over the system, server, and employee data (so no fully managed black-box cloud PaaS where we don't control the underlying infrastructure/server location).

Questions I have for the community:

  1. Hosting: Given the need for complete control over the infrastructure, should I spin up a self-hosted VPS (e.g., DigitalOcean, Hetzner, AWS EC2) using Laravel Forge or Coolify, or setup a bare-metal LEMP stack manually?
  2. Database Setup: Is running Postgres on the same VPS fine for a small-to-medium internal company tool, or should I decouple it onto its own dedicated instance/managed DB from day one?
  3. Queue & Scheduler: Since payroll will generate PDFs and queue emails, what’s the best low-maintenance way to handle Laravel queue workers (Supervisor/Redis) and the scheduler in a production environment with complete server access?
  4. Data Protection: What are the non-negotiables for securing sensitive financial and employee payroll data on a self-hosted server?

Would love to hear how you'd structure this setup! Any tips, common pitfalls, or architectural recommendations are greatly appreciated. Thanks!


r/PHP 23h ago

xphp v0.3.0: A language is only as alive as its ecosystem

Thumbnail math3usmartins.hashnode.dev
0 Upvotes

recently I released xphp v0.3.0 -- and since a language is only as alive as its ecosystem, I also released:

  1. language server
  2. phpstorm and vscode plugins
  3. collections: the first xphp library, using generics and variance-aware.

I wrote the whole story up here: https://math3usmartins.hashnode.dev/a-language-is-only-as-alive-as-its-ecosystem

I'm looking for criticism and skeptical feedback as much as I'm looking for contributors. xphp can't / shouldn't be maintained by a single person.

p.s. xphp is a superset of php. meaning it compiles into php like typescript compiles into javascript. the most relevant feature so far is generics with variance support. but it also supports closure signature types and other features are coming.

important: xphp is part of the php ecosystem by design. its goal is to help the ecosystem grow bigger and stronger. find more about that at https://github.com/xphp-lang/xphp/blob/main/README.md#ecosystem-and-community-first


r/PHP 4h ago

Opensource PHP/Laravel LMS system feedback

0 Upvotes

Hi everyone,

Over the past few months, we've been building TadreebLMS, an open-source Learning Management System focused on enterprise and corporate training.

We've recently completed a major restructuring of the project

How can we use AI in our product and process to speedup the development, process and customer support ?

The project is built with:

  • PHP / Laravel
  • MySQL
  • Bootstrap / JavaScript
  • Docker

GitHub:
https://github.com/Tadreeb-LMS/tadreeblms

Issues:
https://github.com/Tadreeb-LMS/tadreeblms/issues

We have a huge roadmap like SCRUM Integration, UI upgrade as per FIGMA, Gap Analysis Module Integration, Integrations with HR Systems etc...

Please anyone experience or architect in PHP can give recommendation on best practices, gaps in the system etc..


r/PHP 15h ago

I built Sumire, a small PDO mapper for PHP 8.2+

0 Upvotes

I’ve been building Sumire, a small PDO mapper for PHP 8.2+.

The goal is to make mapping database rows to PHP objects concise without introducing the complexity of a full ORM, while preserving the transparency of PDO.

Sumire deliberately minimizes dependencies and implicit behavior so that database access remains understandable, debuggable, and maintainable.

Current features include:

- PHP attribute-based entity mapping
- SQLite, MySQL, and PostgreSQL support
- Persistence and repository APIs
- Criteria queries, pagination, count, and existence checks
- Transactions
- Basic table creation

Sumire is not intended to replace Doctrine or Eloquent. It is designed for applications that want to stay close to PDO while avoiding repetitive mapping code.

The project is still evolving, so I’d especially appreciate feedback on the API design and what you consider essential for a thin PDO mapping layer.

GitHub:
https://github.com/wind111-lang/sumire

Packagist:
https://packagist.org/packages/wind111-lang/sumire

I’ve been building it with the help of Codex.


r/PHP 12h ago

Discussion There's no pyenv/nvm equivalent for PHP that works out of the box, so I built one

0 Upvotes

I wanted something like pyenv or nvm but for PHP. Couldn't find one that actually works the way those do — resolve deps, build from source, switch versions cleanly. The existing options either wrap pre-built binaries or half-ass the dependency resolution.

So I built phpv: https://github.com/supanadit/phpv

`phpv install 8.4` checks your system, builds whatever deps are missing from source, compiles PHP with the right flags. 25 default extensions, out of the box. Supports PHP 4.x through 8.x, version switching, per-project pinning via .php-version, PECL extensions, PHAR tools, portable bundles you can export and import across machines. Linux amd64/arm64 + macOS Intel/Apple Silicon.

Install:

curl -fsSL https://raw.githubusercontent.com/supanadit/phpv/main/install.sh | bash

Then:

eval "$(phpv init bash)"

phpv install 8

Honest con: it compiles from source, so first install is slow. There's no pre-built PHP binary cache yet — working on portable musl-static bundles so you can skip compiling entirely, but that's not done. What's there now works, it just takes a few minutes on first run.

It works. I've been using it on Ubuntu and macOS daily. But I know there are distros and edge cases I haven't hit — Alpine, Arch, weird setups. If you're on any of those, try it and file an issue if it breaks. I want to know.

Repo: https://github.com/supanadit/phpv

Issues: https://github.com/supanadit/phpv/issues

Break it and tell me.


r/PHP 19h ago

Has anyone successfully migrated a large WordPress site without losing SEO traffic?

0 Upvotes

Every migration checklist makes it sound like ""set up your 301s and you're done,"" but almost everyone I've talked to has a horror story about rankings disappearing afterwards.

If you've migrated a large WordPress site, what ended up being the biggest risk? Was it redirects, internal linking, canonicals, crawl budget, or something you didn't even think about until after launch?

I'm looking into a few website migration services (one of them is IT Monks) because I'd rather avoid learning these lessons the hard way.

Looking back, would you still hire outside website migration services, or do you think a solid in-house team is enough if they plan everything carefully?