src/Output/BaseOutput.php
public function delete($identifiers)
    {
        $parents = func_get_args();

        $id = array_pop($parents);

        $entity = $parents ? $this->resource->singleByParent(end($parents), $id) : $this->resource->single($id);

        if ($this->failsSecurity($entity)) {
            return $this->responseDenied();
        }

        if (!$entity || $this->failsParentMatch($parents)) {
            return $this->responseNotFound();
        }

        $this->resource->delete($id);

        return $this->response(null, 204);
    }
public function delete($identifiers)
    {
        $parents = func_get_args();

        $id = array_pop($parents);

        $entity = $parents ? $this->resource->singleByParent(end($parents), $id) : $this->resource->single($id);

        if ($this->failsSecurity($entity)) {
            return $this->responseDenied();
        }

        if (!$entity || $this->failsParentMatch($parents)) {
            return $this->responseNotFound();
        }

        $this->resource->delete($id);

        return $this->response(null, 204);
    }
public function delete ( $ identifiers ) { $ parents = func_get_args ( ) ; $ id = array_pop ( $ parents ) ; $ entity = $ parents ? $ this -> resource -> singleByParent ( end ( $ parents ) , $ id ) : $ this -> resource -> single ( $ id ) ; if ( $ this -> failsSecurity ( $ entity ) ) { return $ this -> responseDenied ( ) ; } if ( ! $ entity || $ this -> failsParentMatch ( $ parents ) ) { return $ this -> responseNotFound ( ) ; } $ this -> resource -> delete ( $ id ) ; return $ this -> response ( null , 204 ) ; }
Deletes an existing resource.

@param mixed $identifiers,... all the resource identifiers starting with
the parents if applicable down to the requested resource
@return string
Deletes an existing resource .