PHP code snippet – How to save data from api to laravel? $res = $gallery->request('GET','https://www.instagram.com/explore/tags/MIZONEDanceBattle/?__a=1'); $data = json_decode($res->getBody()->getContents(), true); $gallery = Gallery::firtsOrCreate([ 'shortcode', 'thumbnail_src', ], $data]); // add $data here $gallery->save(); Curly hair, very fair, please share :)Click to share on Twitter (Opens in new window)Click to share on Facebook (Opens in new window)Click to share on Reddit (Opens in new window)Click to share on Telegram (Opens in new window)Click to share on WhatsApp (Opens in new window)Click to email a link to a friend (Opens in new window) Subash Chandran 19th November 2021 Leave a Comment