/** * Deletes a photo from the database. * * @param $id - Id of the pack to be deleted * @return Response * @throws ResourceNotFoundException */ public function delete($id) { $id = $this->filter->sanitize($id, 'int'); try { $photo = Photo::findFirstOrFail(['id = ?0', 'bind' => [$id]]); return $this->response($this->request, $photo); } catch (ResourceNotFoundException $e) { return $e->returnResponse(); } }