Search code examples
phplaravellaravel-7

How to add laravel to PHP existing project?


I have a large project in PHP (core) as shown in the image, using mvc: PHP existing project

And now I would like to start using Laravel on it.

How is the best possible way to do it?


Solution

  • You can't just "install" Laravel on an existing project.

    Laravel is a framework, and it comes with a specific folders structure, specific files, specific working and logic, etc. So you can't just "transform" a project to a Laravel project.

    You will need first to train yourself on Laravel (see documentation) and then migrate your existing project to Laravel, by creating controllers, models, etc. in Laravel. You could save time because you already have some code in your existing project, but the migration will not happen on its own :-)