public function fresh($with = [])
    {
        if ($this->isEmpty()) {
            return new static;
        }

        $model = $this->first();

        $freshModels = $model->newQueryWithoutScopes()
            ->with(is_string($with) ? func_get_args() : $with)
            ->whereIn($model->getKeyName(), $this->modelKeys())
            ->get()
            ->getDictionary();

        return $this->map(function ($model) use ($freshModels) {
            return $model->exists && isset($freshModels[$model->getKey()])
                    ? $freshModels[$model->getKey()] : null;
        });
    }
public function fresh($with = [])
    {
        if ($this->isEmpty()) {
            return new static;
        }

        $model = $this->first();

        $freshModels = $model->newQueryWithoutScopes()
            ->with(is_string($with) ? func_get_args() : $with)
            ->whereIn($model->getKeyName(), $this->modelKeys())
            ->get()
            ->getDictionary();

        return $this->map(function ($model) use ($freshModels) {
            return $model->exists && isset($freshModels[$model->getKey()])
                    ? $freshModels[$model->getKey()] : null;
        });
    }
public function fresh ( $ with = [ ] ) { if ( $ this -> isEmpty ( ) ) { return new static ; } $ model = $ this -> first ( ) ; $ freshModels = $ model -> newQueryWithoutScopes ( ) -> with ( is_string ( $ with ) ? func_get_args ( ) : $ with ) -> whereIn ( $ model -> getKeyName ( ) , $ this -> modelKeys ( ) ) -> get ( ) -> getDictionary ( ) ; return $ this -> map ( function ( $ model ) use ( $ freshModels ) { return $ model -> exists && isset ( $ freshModels [ $ model -> getKey ( ) ] ) ? $ freshModels [ $ model -> getKey ( ) ] : null ; } ) ; }
Reload a fresh model instance from the database for all the entities.

@param  array|string  $with
@return static
Reload a fresh model instance from the database for all the entities .