I
I
IvanIvanoff2019-09-06 16:22:48
Laravel
IvanIvanoff, 2019-09-06 16:22:48

Laravel & Legacy project - how to make friends?

Hello!
There is a project written without any framework, purely on scripts. There was a need to smoothly translate it into Laravel. That is, the main project will be transferred screen by screen (one view at a time) to the lara.
Now about the difficulties - the main project uses some directories, some of them intersect with Laravel. There is no desire to mix cutlets and flies into one pile, but somehow you need to run both Laravel and the project in parallel, so that part is given through the new engine, and part (not transferred) through the old one.
Actually, the question is:
How and where can Laravel be inserted so that:
a) it can be used in the project and
b) it does not interfere and does not get confused with legacy scripts (Lara core) and
c) the Laravel core could be placed in Git and somehow updated if necessary (updates will suddenly come out)
It seems like an option to shove it as a module into the vendor folder, but here's how.
Or what other options are there?
I would be grateful for an answer!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nujabes37, 2019-09-06
@Nujabes37

You create a separate directory for the project with Laravel. You create a main route for all apis, for example /api/v1. Then you redirect all requests with this route to the php-fpm project with laravel))

K
Kirill Pechkin, 2020-08-19
@Peckin

If still relevant, translation of the article. At the end of the link to the original.
https://laravel.demiart.ru/converting-legacy-to-la...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question