CakePHP and Laravel coexist

I get a chalenging task to port the old cakephp 2 application of the old to laravel 5.2.

Both must coexist and work togheter, while all modules migrate to laravel, because it is a great application.

Is it possible / possible? Authentication session credentials can be easily transferred to an authentication session in laravel?

What traps can you find in this process? and how can i avoid them?

I just found the following steps: http://laravel.io/forum/09-08-2014-strategy-for-migrating-a-large-cakephp-project-to-laravel?page=1#reply-28620

Has anyone done this before?

+7
php cakephp laravel
source share
1 answer

The most logical solution would be to immediately transfer the entire application to Laravel. However, if this is not possible, it should be possible. If you conduct sessions in Redis, they will of course be available for both applications. Main problems:

  • You want the User object in the Laravel application to be authenticated, but authentication takes place in the Cake application. Therefore, you may need to reauthorize the Laravel application. However, if you know that the session is valid and you have a user ID, you can do it without problems.
  • A session token is generated in different ways: Laravel will generate its token through one algorithm using its application key. Without knowledge of CakePHP, I am sure that the session key is generated in different ways. You may be able to overcome this by modifying key generation to match them. Otherwise, you will encounter problems for hashing salts, checking CSRF, and something else that happens between applications.
+3
source share

All Articles