Mohamed Mufeed

Contact

Email
Phone
Location
Dubai, UAE
2022 → present · Incremental modernisation

Running Laravel on top of a legacy PHP codebase

Modernised a native-PHP, directory-routed product in place, without a rewrite and without downtime for 200+ clients.

  • Laravel
  • PHP 5.6 → 7.4
  • Redis
  • WebSockets
  • OAuth2 / JWT
5.6 → 7.4
PHP upgrade for new clients
1 login
single sign-on across the app
Self-hosted
WebSockets replacing paid Pusher

The problem

The product was native PHP on an end-of-life runtime, with directory-based routing and schema changes applied by hand in production. A rewrite wasn’t realistic, but the codebase needed modern foundations.

Approach

  1. 01

    Start with migrations

    Introduced version-controlled database migrations, which ended manual production schema edits and gave Laravel its first foothold.

  2. 02

    Replace auth and session

    Swapped the legacy auth and session layers so Laravel runs underneath the old code. One auth provider, one login.

  3. 03

    Open the platform up

    Added API routes (JWT, OAuth2), middleware, queues, schedulers, events and Redis caching, plus a containerised Soketi server for real-time notifications.

Outcome

Legacy code can now be ported gradually. The self-hosted notification centre serves every client and cut third-party costs significantly.

What I took away

You can modernise a live system one layer at a time if each step pays for itself.

Next case study →Carving 300+ invoices back from a dropped database