protected function getAffectedRecords()
    {
        // model only
        if ($this->model->getKey()) {
            $records = [$this->model];
        }

        // mass assignment
        else {
            $records = $this->query->get();
        }

        return $records;
    }
protected function getAffectedRecords()
    {
        // model only
        if ($this->model->getKey()) {
            $records = [$this->model];
        }

        // mass assignment
        else {
            $records = $this->query->get();
        }

        return $records;
    }
protected function getAffectedRecords ( ) { // model only if ( $ this -> model -> getKey ( ) ) { $ records = [ $ this -> model ] ; } // mass assignment else { $ records = $ this -> query -> get ( ) ; } return $ records ; }
Get affected records.

@return array
Get affected records .