Beispiel #1
0
 /**
  * return the paginated images as JSON response
  *
  * @return mixed
  */
 public function index()
 {
     $photos = $this->photos->getAll(8, 'created_at', 'DESC');
     return Response::json(['status' => 'success', 'photos' => $photos->toJson()]);
 }
Beispiel #2
0
 /**
  * call the photo repository to create a photo object
  *
  * @param $data
  *
  * @return mixed
  */
 public function create($data)
 {
     return $this->photos->createWithUri($data['original'], $data['thumbnail'], $data['small'], $data['square']);
 }