예제 #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()]);
 }
예제 #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']);
 }