Legacy System Modernisation

PHP applications modernisation

We’ve previously helped several of our clients to modernise their systems. This post is about modernising an existing PHP application and moving it to Laravel. Laravel is an open-source web development framework with a lot of free-to-use tools around it. Laravel has a huge community all around the world.

Recently, we’ve helped two of our clients to update their CRM systems from plain PHP to Laravel. The transition was rather smooth as we’ve left all the existing infrastructure in place, but wrapped Laravel around it. This allowed us to minimise migration costs and still let developers have all the benefits of the Laravel framework.

In the legacy PHP application, developers have to implement all the basics of the modern web application (e.g. handling database connection and setting up email sending connection). Laravel provides this out of the box so developers can focus on delivery.

The Laravel framework already ships with all the basic features to get the web application started.

To give an example, the legacy applications for our two recent clients used to have input validation. This input validation was a custom-written code with no specific structure. This was very fragile, having to ensure the validation was still working when changing something on the form or adding a new field.
Input validation in Laravel, on the other hand, follows a robust structure. It defines the validation behaviour internally, and it is not spread out across the code that developers are working with, as it used to be in the legacy PHP app. Laravel handles the validation logic. The code that application developers are working with only defines the validation rules. This allows the application developers to really focus on what’s important for the business and deliver on that.

Another example is about environment variables. It is a best practice to have environment variables stored in a separate dedicated file loaded by the application. In the legacy application, sensitive data was not stored in a dedicated file, but rather spread out across the code base. Before the application was migrated to Laravel, we made an attempt to move sensitive data to a separate file with the help of a PHP package. With this PHP package, you still need to configure the location of the environment variables file and make sure the file is loaded. With Laravel, you get the environment variable handling out of the box.

Laravel makes it easy to run an application on the developers' machines with Docker containers. This allows for easier testing of updates without affecting production data.

Having built the application, we ensure they continue running smoothly. One of the actions we take to achieve this is connecting the Laravel applications we build to the internal Slack channel, where our developers get notified of any issues and take prompt action. Again, this is something very easy to set up with Laravel. With a legacy PHP application, this would require a lot of custom code to be set up.

AI-aided development. These days, AI coding agents can produce high-quality boiler plate code. This can be used to your advantage to speed up the delivery and reduce development costs even further. The good news is that Laravel ships with multiple extra packages for AI development. One of those packages is called Laravel Boost. It provides AI agents with skills to explore the code base and database, and generate code that is more likely to work correctly from the first run.

Migrating from Microsoft Access to Laravel

Some of our clients already had Microsoft Access-based CRMs developed a while ago. Microsoft Access is a Microsoft product. Therefore, it requires a machine running the Microsoft Operating System. Laravel application, on the other hand, is available to anyone with internet access from any device, both mobile and desktop clients.

When moving business processes from the Microsoft Access system to the new Laravel application, the goal is to keep the familiarity of interaction with the CRM. We accomplish this by digging into the existing Microsoft Access system. We study what important features it has and how the company’s staff is using those features. Based on what we’ve learned about the legacy Microsoft Access system, we then migrate these features into the new Laravel application. To keep the experience of using CRM familiar to staff, we duplicate the user interface in Laravel. For example, if there is an input form in the Microsoft Access system, we create a similar input form in Laravel, maintaining the relative position of the input fields in the form. If there is a report going out of the legacy system, we create the same report in Laravel, which is sent out following the same schedule.

Alongside replicating the familiar experience of using legacy CRM in the modern Laravel application, we work on adding new features to it, which our clients state as a requirement for the new system.

Microsoft Access-based CRMs run MSSQL databases. To ensure a smooth transition, we connect the newly developed Laravel application to the existing MSSQL database. This allows a small portion of the team to test the new Laravel application without disrupting existing business processes.

To give an example, we will take a look at developing a Laravel application for our latest client, a local decorating company that had a legacy Microsoft Access system.

We’ve studied their existing Microsoft Access application and replicated it in Laravel. Some of the additions made to the existing workflows of the new CRM:

  • Developing a daily automated task to notify the company’s customers via SMS and email a day before the decorating work was scheduled.
  • Sending documents and feedback letters to customers as an online form. The decurating company would previously send this to each customer via post. The downsides of this are the time delay required to deliver the post to the customer and then back to the office; and additional paperwork to manage. In the improved workflow, staff dispatch a link to the online form in the email for the customer to fill out. Once filled out, the form is instantly available on the CRM for staff to take any further action.
  • Document uploading. The decorating company employs a number of decorators. For legal and compliance reasons, they need to keep documents from the decorators. We’ve centralised and simplified this process, allowing decorators to upload documents to the CRM directly and tag the uploads appropriately. Office staff can then review these uploads from CRM and search through them easily.
  • Scheduling calendar. For ease of scheduling and reviewing scheduled work, we’ve added a calendar that lists decorators in rows and all the work they have assigned in a certain period.
  • The legacy system would generate quotes and other documents on the local network and then open the location once the document is ready for review. The usual flow in case of a Laravel application would be to generate the document and download it directly. The decorating company specifically requested to preserve the process they are already familiar with, and also prevent polluting the Downloads folder on the computer. We’ve developed the new Laravel CRM in a way that it generates a document on the network, and using a browser extension, opens up the network location on the staff’s computer.
  • For ease of logging in, we’ve added a feature to log in with Google. This is available for users who already exist on the CRM. One less password to remember and smoother interaction with the database!

Have a legacy system that is holding your business back? We have experience developing modern Laravel applications off of existing legacy systems. Laravel lets CRMs stay on top of all recent innovations in the field of application development. Let’s talk!