public function refresh()
    {
        if (! $this->exists) {
            return $this;
        }

        $this->setRawAttributes(
            static::newQueryWithoutScopes()->findOrFail($this->getKey())->attributes
        );

        $this->load(collect($this->relations)->except('pivot')->keys()->toArray());

        $this->syncOriginal();

        return $this;
    }
public function refresh()
    {
        if (! $this->exists) {
            return $this;
        }

        $this->setRawAttributes(
            static::newQueryWithoutScopes()->findOrFail($this->getKey())->attributes
        );

        $this->load(collect($this->relations)->except('pivot')->keys()->toArray());

        $this->syncOriginal();

        return $this;
    }
public function refresh ( ) { if ( ! $ this -> exists ) { return $ this ; } $ this -> setRawAttributes ( static :: newQueryWithoutScopes ( ) -> findOrFail ( $ this -> getKey ( ) ) -> attributes ) ; $ this -> load ( collect ( $ this -> relations ) -> except ( 'pivot' ) -> keys ( ) -> toArray ( ) ) ; $ this -> syncOriginal ( ) ; return $ this ; }
Reload the current model instance with fresh attributes from the database.

@return $this
Reload the current model instance with fresh attributes from the database .