public function delete($entity)
    {
        if (($entity instanceof Model) === false) {
            $entity = $this->find($entity);
        }

        if ($entity->delete()) {
            $this->flushCache();

            return true;
        }

        return false;
    }
public function delete($entity)
    {
        if (($entity instanceof Model) === false) {
            $entity = $this->find($entity);
        }

        if ($entity->delete()) {
            $this->flushCache();

            return true;
        }

        return false;
    }
public function delete ( $ entity ) { if ( ( $ entity instanceof Model ) === false ) { $ entity = $ this -> find ( $ entity ) ; } if ( $ entity -> delete ( ) ) { $ this -> flushCache ( ) ; return true ; } return false ; }
Delete a entity in repository

@param mixed $entity

@return bool|null

@throws \Exception
Delete a entity in repository