Hi and thanks for your replies.

On selector value change I am submitting a form from blade to a route controller.

from JS event.preventDefault(); document.getElementById('set-company-id').submit();

the controller method is as below $request->session()->put('company_id', $company_id); return back();

i am printing in the blade view {{ session('company_id') }}

On the first selector change the value is set to 1 for example then on subsequent changes it remains as 1.

I tried to return the value of company_id from the controller and it was returning correctly.

So i came to the conclusion that the problem is in the session setting.

I also tried to change the session driver from database back to file.... the result remained the same.

Return to Thread...