src/Norm/Collection.php
public function remove(Model $model = null)
    {
        if (func_num_args() === 0) {
            $this->connection->remove($this);
        } else {
            // avoid remove empty model
            if (is_null($model)) {
                throw new \Exception('[Norm/Collection] Cannot remove null model');
            }

            $this->applyHook('removing', $model);
            $result = $this->connection->remove($this, $model);

            if ($result) {
                $model->reset();
            }

            $this->applyHook('removed', $model);
        }
    }
public function remove(Model $model = null)
    {
        if (func_num_args() === 0) {
            $this->connection->remove($this);
        } else {
            // avoid remove empty model
            if (is_null($model)) {
                throw new \Exception('[Norm/Collection] Cannot remove null model');
            }

            $this->applyHook('removing', $model);
            $result = $this->connection->remove($this, $model);

            if ($result) {
                $model->reset();
            }

            $this->applyHook('removed', $model);
        }
    }
public function remove ( Model $ model = null ) { if ( func_num_args ( ) === 0 ) { $ this -> connection -> remove ( $ this ) ; } else { // avoid remove empty model if ( is_null ( $ model ) ) { throw new \ Exception ( '[Norm/Collection] Cannot remove null model' ) ; } $ this -> applyHook ( 'removing' , $ model ) ; $ result = $ this -> connection -> remove ( $ this , $ model ) ; if ( $ result ) { $ model -> reset ( ) ; } $ this -> applyHook ( 'removed' , $ model ) ; } }
Remove single model

@param \Norm\Model $model

@return void
Remove single model