public function delete($id)
    {
        // Find the given instance
        $deleted  = false;
        $instance = $id instanceof Model ? $id : $this->find($id);

        if ($instance) {
            // Delete the instance
            $deleted = $instance->delete();

            // Fire the deleted event
            $this->getContainer('events')->fire($this->getRepositoryId().'.entity.deleted', [$this, $instance]);
        }

        return [
            $deleted,
            $instance,
        ];
    }
public function delete($id)
    {
        // Find the given instance
        $deleted  = false;
        $instance = $id instanceof Model ? $id : $this->find($id);

        if ($instance) {
            // Delete the instance
            $deleted = $instance->delete();

            // Fire the deleted event
            $this->getContainer('events')->fire($this->getRepositoryId().'.entity.deleted', [$this, $instance]);
        }

        return [
            $deleted,
            $instance,
        ];
    }
public function delete ( $ id ) { // Find the given instance $ deleted = false ; $ instance = $ id instanceof Model ? $ id : $ this -> find ( $ id ) ; if ( $ instance ) { // Delete the instance $ deleted = $ instance -> delete ( ) ; // Fire the deleted event $ this -> getContainer ( 'events' ) -> fire ( $ this -> getRepositoryId ( ) . '.entity.deleted' , [ $ this , $ instance ] ) ; } return [ $ deleted , $ instance , ] ; }
Delete an entity with the given id.

@param mixed $id

@return array
Delete an entity with the given id .