Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #save #data #api #laravel
ADD COMMENT
Topic
Name
4+5 =