How would I use Laravel full framework in a subfolder of a non-laravel application

270 Views Asked by At

I have searched, but not finding my use case, although I would think it was a bit more common. Maybe I just don't know what to look for.

I Have an application with an unknown framework, and am slated to re-develop a couple features (sections) that use about 20 tables of old SQL data, which I'm converting to MySQL. The old code is aspx/Access. I will need the aid of migration files to adjust this data to get it to work, since the conversion wont be clean, and I'm not a DB administrator per say, rather "full stack".

What I would "like" to do, is use Laravel Framework to build out these two features, one has a bunch of dropdown selector pages, the other is a questionnaire page/pages. Both of these sections need to be accessible in either one subfolder, or one subfolder for each, of the parent app, as some kind of include/require/autoload (not an iframe).

Also note, this Laravel site will be loaded in the content area, and sandwiched between the header and footer of the parent application, and loaded when the question/ and selector/ paths are used in the URL. So essentially, for only the two paths on the site, I want Laravel to do the heavy lifting.

I already have a Laravel base app I'm working with on other projects so it should save me a lot of time to use it in this mixed project. I'm just not sure what it entails to map the routes, and how to include the Laravel core framework into the parent application. I'm simply not sure how to integrate this framework into the parent app, or if this will work.

I'm short on keywords to search for the solutions also. I can use some keywords. I saw modules, but I'm not sure that's what I'm looking for. I also see this stack article, which looks like one way to get the public out of the framework directory, which might be useful.

Why am I avoiding straight PHP? Because of the amount of tables, non standard field naming, and because I have a Laravel base app pre-configured for my environment and my tastes, which I have been working with on several projects lately, so am fairly fluent in it, etc..

Any suggestions on how to use Laravel to build some sections that are to be sandwiched in parent website? Will it work?

1

There are 1 best solutions below

1
On

I would build the new Laravel app separately and use it as an API to present data for the existing app.

You can keep moving features over this way until finally you are only using the existing app as a 'front end' and it no longer has any business logic associated.

At that point, you can migrate the front end to Laravel views or a different front end framework.