src/Table.php
public function setModels($models)
    {
        if (!is_object($models)) {
            if (is_array($models)) {
                $models = collect($models);
            }
        }

        if(class_basename($models->first()) == 'stdClass')
        {
            $models = $models->map(function ($array) {
                return new BlankModel($array);
            });
        }

        $this->models = $models;
    }
public function setModels($models)
    {
        if (!is_object($models)) {
            if (is_array($models)) {
                $models = collect($models);
            }
        }

        if(class_basename($models->first()) == 'stdClass')
        {
            $models = $models->map(function ($array) {
                return new BlankModel($array);
            });
        }

        $this->models = $models;
    }
public function setModels ( $ models ) { if ( ! is_object ( $ models ) ) { if ( is_array ( $ models ) ) { $ models = collect ( $ models ) ; } } if ( class_basename ( $ models -> first ( ) ) == 'stdClass' ) { $ models = $ models -> map ( function ( $ array ) { return new BlankModel ( $ array ) ; } ) ; } $ this -> models = $ models ; }
Overwrite all current rows with the ones passed.
@param $models
Overwrite all current rows with the ones passed .