calin24
calin24

Reputation: 981

can`t get value from session Online using Laravel 5.4

The Session::get('session_var') don`t work online (on a production server). Offline i can get the value from it.

I use Illuminate\Support\Facades\Session in laravel 5.4

I do some operation in controller and i am using Session::put('session_var', value) to store some values.

When it redirect me to the view i want to check that 'session_var' if it`s there using blade

if: @if(Session::get('session_var')) 

On my local server is there. The problem is online that is not there. In storage/sessions i can see the sessions and my variables that i set it are there.

What could be the problem?

Upvotes: 1

Views: 500

Answers (1)

calin24
calin24

Reputation: 981

I found the problem....in the .env file i was having SESSION_DOMAIN=localhost

I forgot to modify it to the name of the domain or delete the line to use the default

Upvotes: 1

Related Questions