my cookie is null! But I don't know :
use Illuminate\Support\Facades\Cookie;
HomeController:
public function index()
{
Cookie::queue('currentLang', 'heb', 999999999);
$cat1 = $this->categoryRepo->findCategoryById(1);
$lastPosts = $this->blogPosts->listBlogPosts(array('*'),'id','desc')->take(3);
return view('front.index', compact('cat1','lastPosts'));
}
now I want to get this key from another controller:
LoginController:
public function showLoginForm()
{
dd(Cookie::get('currentLang'));
return view('auth.login');
}
but it returns null ! I'm working on localhost.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire