Vinoth
Vinoth

Reputation: 23

how to set remember me option in laravel 5.4 using cookie

in controller

$cookie=Cookie('rem_username',$username,60);
$cookie1=Cookie('rem_password',$password,60);
    return redirect()->action("Logincheck@dashboardvalue")->cookie($cookie)->cookie($cookie1);

the cookies are set , how to use this in view page of login

Upvotes: 0

Views: 721

Answers (2)

AddWeb Solution Pvt Ltd
AddWeb Solution Pvt Ltd

Reputation: 21681

May this also work for you:

{{\Illuminate\Support\Facades\Cookie::get('rem_username')}}

Upvotes: 0

vijaykumar
vijaykumar

Reputation: 4806

You can use Cookie facade or use cookie helper function

{{ Cookie::get('rem_username') }} OR 

{{ cookie('rem_username') }}

Upvotes: 2

Related Questions