Access a Laravel session variable using a non laravel PHP method

Viewed 106

I have found a method from searching this site to use laravel to access a standard PHP session, but can't see a way to do it the other way round.

I create a session variable in laravel using

$loggedUser =  $_SESSION['loggedUser'] = Auth::id();  
View::share('loggedUser', $loggedUser);

Throughout the laravel section of my project this method works fine. I have another folder structure within the project which I am not using laravel in, but they connect to the same database. This folder is sitting inside public/calendar/calendar.php

Calendar.php

session_start();
echo $_SESSION['loggedUser'];

But I can't get any result to come through for this. Any ideas where I'm going wrong?

0 Answers
Related