Don't put the app running on two frameworks or some similiar, it will become really painful to maintain, start migrating and put all on laravel when it's done, without half transitions.
Just my 2 cents.
This is a pretty large complex business-application. Migration will take several months to complete. It is also in constant development with new features.
I am looking at different approaches:
Although this doesn't help with the question, I have to ask - why?
What benefits are you going to get from Laravel that Cake doesn't provide? Sure there might be things which Laravel does better and makes easier, but is the months of development time and money worth that - as you'll be able to do anything in Cake which Laravel can do, just how it's done is different.
I ask this, because a company I also work with thought about doing this but said no as there were no massive benefits for the dev time involved.
If you read my first post, you will see that just upgrading our project to cake 3.0 will take many hours, since alot in model layer has changed. So I am not sure the amount of work is that different.
My real question here is if it is possible to wrap a cakeApp inside Laravel in the transision period, or vice versa.
Yes, you can have one site running on both frameworks at once without having them step on each other. I've done this before by:
<?php
require_once('../config.php');
if (preg_match("/^\/(user\/|admin|app|content|wall)/", $_SERVER['REQUEST_URI'])) {
require_once('../laravel/index.php');
} else {
require_once('../cake/index.php');
}
Hi dslawrence
Could you please provide more in-depth details about the steps ? specially about step 3 and 4 ?
3 step could be accomplished with a simple symlink (assuming the os is linux):
project/
-- laravel
--- public/ -> symlink to ../public
-- cakephp
--- webroot/ -> symlink to ../public
-- public/
--- index.php <- as shown in 4 step.
Then apache vhost config webroot should point to project/public.
@dslawrence How can you get the cakephp session in order to keep the user authenticated from cakePHP to Laravel ?
May i ask what are the targets you're trying to achieve by migrating to Laravel?
@astroanu in my case the cakephp app have many modules and the migration to version 3 would not be so fast as the development in Laravel. So i need to migrate module by module to laravel and then turn off cakephp. Only need to discover how to maintain the login routing from cake to laravel or from laravel to cake.
In my situation i would like that a cakephp session would be valid to generate a login into laravel, just can not see the way this can be done, if it can be done.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community