I am getting empty cookie in laravel 5 -


i setting cookie in such request following:

$cookie1 = cookie::make('payment_method_id', 1, 60); $cookie2 = cookie::make('payment_value', 2, 60); 

and in page want read cookie following:

    $val1 = cookie::get('payment_method_id');     $val2 = cookie::get('payment_value'); 

but got empty, missing?

you making cookie not attaching response should attach cookie using this:

response::withcookie(cookie::make('payment_method_id', 1, 60)); 

check documentation more information.


Comments

Popular posts from this blog

android - Pass an Serializable object in AIDL -

How to provide Authorization & Authentication using Asp.net, C#? -

How to use Authorization & Authentication in Asp.net, C#? -