Answer the question
In order to leave comments, you need to log in
How to write to the user's cache?
in Controller.php I check for the presence of a partner id and if I find it, I cache it, but for some reason it is entered into the site's global cache
public function __construct()
{
$this->middleware(function ($request, $next) {
if($request->has('utm')) Cache::put('partner_id', trim(htmlspecialchars((int)$request->utm)), now()->addYear());
return $next($request);
});
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question