Answer the question
In order to leave comments, you need to log in
Where to store the result in PHP from the response from the server?
In the controller I receive data from a request for an external resource. The response contains an object with a field page
.
How and where can I save this result for the entire client session?
So that the next request sends a request with the updated page
?
Say, in Objective C, a model with a singleton method is used for this, roughly speaking a static variable available in each application controller throughout the session.
In php (Laravel) - everything seems to be different.
Answer the question
In order to leave comments, you need to log in
as an option
Cache::set('key');
Cache::put('key', 'value');
$key = Cache::get('key'); // 'value'
// а это на всякий случай
Cache::forget('key');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question