protected function buildRowsFromModel($model): void
    {
        $this->model = $model = $this->buildModel($model);

        if ($model instanceof Paginator) {
            $this->setRowsData($model->items());
            $this->paginate = true;
        } elseif ($model instanceof Collection) {
            $this->setRowsData($model->all());
        } elseif ($model instanceof Arrayable) {
            $this->setRowsData($model->toArray());
        } elseif (\is_array($model)) {
            $this->setRowsData($model);
        } else {
            throw new InvalidArgumentException('Unable to convert $model to array.');
        }
    }
protected function buildRowsFromModel($model): void
    {
        $this->model = $model = $this->buildModel($model);

        if ($model instanceof Paginator) {
            $this->setRowsData($model->items());
            $this->paginate = true;
        } elseif ($model instanceof Collection) {
            $this->setRowsData($model->all());
        } elseif ($model instanceof Arrayable) {
            $this->setRowsData($model->toArray());
        } elseif (\is_array($model)) {
            $this->setRowsData($model);
        } else {
            throw new InvalidArgumentException('Unable to convert $model to array.');
        }
    }
protected function buildRowsFromModel ( $ model ) : void { $ this -> model = $ model = $ this -> buildModel ( $ model ) ; if ( $ model instanceof Paginator ) { $ this -> setRowsData ( $ model -> items ( ) ) ; $ this -> paginate = true ; } elseif ( $ model instanceof Collection ) { $ this -> setRowsData ( $ model -> all ( ) ) ; } elseif ( $ model instanceof Arrayable ) { $ this -> setRowsData ( $ model -> toArray ( ) ) ; } elseif ( \ is_array ( $ model ) ) { $ this -> setRowsData ( $ model ) ; } else { throw new InvalidArgumentException ( 'Unable to convert $model to array.' ) ; } }
Get rows from model instance.

@param  object  $model

@throws \InvalidArgumentException

@return void
Get rows from model instance .