Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

rizaldywirawan's avatar

Can We Create Session in Laravel while Login from CodeIgniter?

Dear Good People,

We have 2 application, one from CodeIgniter and we will use Laravel to build the other one.

Let's say the domain for CodeIgniter is webci.com, and the Laravel is weblara.com

My question is:

Can we create session in weblara.com when the user login from webci.com?

I already try using API, the response from Auth::check() was true, but I don't understand why the status is not login when we access the weblara.com?

When i try to dd Auth::check() from weblara.com it will return false.

Or maybe I do something wrong? If yes, please tell me the proper way to do this.

Or is this still possible?

Thank you

0 likes
2 replies
Cronix's avatar

Because the sessions use a cookie to hold the session id, which then subsequently get transferred on each request back to the server.

Domain webci.com and weblara.com are two separate domains, so they can't read each others cookies.

If it was setup like ci.domain.com and lara.domain.com (subdomains on the same domain), then they could read each others cookies if you set .domain.com as the cookie domain in /config/sessions.php

rizaldywirawan's avatar

@Cronix hola,

I will try to implement your answer as soon as possible to find out.

Out of curiousity, is this implementation possible?

ci.domain.com and ci.domain.com/lara

If yes, how do achieve this?

Thank you

Please or to participate in this conversation.