Reputation: 2509
I've got a basic, default install of Laravel with Breeze running. I want to be able to load the session data from a PHP script that is not running Laravel.
I'm using the 'file' SESSION_DRIVER. I can see the session files in framework sessions. For example the current session I have has a filename of b8lsMW3mjyszDIErNd2aP4SSblt01tStwdCCxzLD
. I can see the data I want to get serialised in the file.
When my (non Laravel) script runs, I can read the 'laravel_session' cookie, it has a value of laravel_session:"eyJpdiI6ImVjQkYvWWhQSlZZYUdVNk55Y0R5OFE9PSIsInZhbHVlIjoidG0xeWFjdXR3U3M0cEl2RzBVZnZ1YzZCcFlPVFVXNVNIbmM4YTRNdnZSWmcrUi83NUlXTmF5QXpRS1ZoeGd6Y01PeFdoYVliQXBvQ3lZOGhPdHltWVdURUZON3pxUkdIQ2hxLzBIcVZuMVRnTm5NMmdsT2cwV1ZlRk02OTQ2bjQiLCJtYWMiOiJlNWQzN2RjNDhmYTRhNDYxZDY4NzM0NmY5MjY2MDMwMGZkZGM4MzEzMTc1OTc1ZDA5ZWY0MzcxZGExMjZhYTYyIiwidGFnIjoiIn0%3D"
What I cannot understand is how, from the value in the laravel_session cookie I can calculate the filename of the correct session to load.
Upvotes: 0
Views: 228