简体   繁体   中英

I want to save response from api and re_used with next request from user in php laravel framework ..without save to database?

enter code here

enter code here` $response = Http::withHeaders($headers)->post($URL, $postdata);

Just save the response in session, example:

Session::put('sessionName', $response);

And if you want to call it you can use:

Session::get('sessionName');

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM