owncloud laravel api code example
Example 1: laravel dingo api response
return $this->response->noContent();
return $this->response->created($location);
return $this->response->created();
return $this->response->error('This is an error.', 404);
return $this->response->errorNotFound();
return $this->response->errorBadRequest();
return $this->response->errorForbidden();
return $this->response->errorInternal();
return $this->response->errorUnauthorized();
Example 2: 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]);
$gallery->save();