I want to migrate a very old-fashioned PHP app gradually to Laravel. The application does not yet use a general entry point, but uses direct file URLs to work. So, in order to gradually move over functionality, I would like to check first in my routes whether the url exists as a physical file on the server. If that is the case, execute that file. If not, go through the laravel routes.
I have been looking into both the excellent ‘Legacy to Laravel’ blogpost by Tighten and an older article on PHPArch ‘Migrating Legacy Web apps to Laravel’. They both assume there is one front-end controller, which isn’t the case in my application.
What would be the cleanest way of implementing this in Laravel 11?
David Janssens is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.