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