简体   繁体   中英

How to get session variable/data outside of laravel project?

Is there any way to get session variable/data outside of the laravel application?

I have a project in core php (eg: myproject) directory and now I want to signup/signin from laravel which will be placed in internal directory (eg: myproject/laravel). I want to get signed-in user's details through session in myproject directory.

Is there any way/alternate for that?

You will have to add session_start(); in public/index.php on the top. After that still need to set your external sessions in the classic way $_['mysession'] = 'something'; . Remember that this will not work if you want to access auth() methods outside Laravel.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM