Legacy to Laravel: How to Modernize an Aging PHP Application

The folks at Tighten:

In this post, I’ll present some strategies we use at Tighten to convert legacy apps to Laravel gradually over time, without needing to perform a full rewrite. Whether you’re upgrading from an old framework or moving to a framework for the first time, following these steps will let you start benefitting from all that Laravel has to offer right away.

What they basically do is set up a new Laravel project and have it catch the parts that they changed/added. Using a catchall rule, all other requests are routed to the legacy code. Clever.

Route::any('{path}', 'LegacyController@index')->where('path', '.*');

From then on they start migrating to Eloquent models, introduce some helper functions, etc.

Legacy to Laravel: How to Modernize an Aging PHP Application →

Published by Bramus!

Bramus is a frontend web developer from Belgium, working as a Chrome Developer Relations Engineer at Google. From the moment he discovered view-source at the age of 14 (way back in 1997), he fell in love with the web and has been tinkering with it ever since (more …)

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.