src/ExtendedRepository.php
public function activateRecord($id, $active = true)
    {
        if ( ! $this->hasActive) return false;

        $model = $this->makeModel(false);

        if ( ! ($model = $model->find($id))) return false;

        $model->{$this->activeColumn} = (boolean) $active;

        return $model->save();
    }
public function activateRecord($id, $active = true)
    {
        if ( ! $this->hasActive) return false;

        $model = $this->makeModel(false);

        if ( ! ($model = $model->find($id))) return false;

        $model->{$this->activeColumn} = (boolean) $active;

        return $model->save();
    }
public function activateRecord ( $ id , $ active = true ) { if ( ! $ this -> hasActive ) return false ; $ model = $ this -> makeModel ( false ) ; if ( ! ( $ model = $ model -> find ( $ id ) ) ) return false ; $ model -> { $ this -> activeColumn } = ( boolean ) $ active ; return $ model -> save ( ) ; }
Update the active boolean for a record

@param int     $id
@param boolean $active
@return boolean
Update the active boolean for a record