src/Traits/ApiActions.php
public function destroy($id)
    {
        $id = $this->getRealId($id);
        
        $resource = $this->repository->find($id);
        
        if (! $resource) {
            return $this->notFound();
        }
        
        $result = $resource->delete();
        
        return $this->success($result);
    }
public function destroy($id)
    {
        $id = $this->getRealId($id);
        
        $resource = $this->repository->find($id);
        
        if (! $resource) {
            return $this->notFound();
        }
        
        $result = $resource->delete();
        
        return $this->success($result);
    }
public function destroy ( $ id ) { $ id = $ this -> getRealId ( $ id ) ; $ resource = $ this -> repository -> find ( $ id ) ; if ( ! $ resource ) { return $ this -> notFound ( ) ; } $ result = $ resource -> delete ( ) ; return $ this -> success ( $ result ) ; }
Delete a resource.

@return \Illuminate\Http\Response
Delete a resource .