src/Settings/Settings.php
public function set(array $attributes)
    {
        collect($attributes)->each(function ($value, $key) {
            $this->setKeyValue($key, $value);
        });

        // If we were working with eagerly-loaded relation,
        // we need to reload its data to be sure that we
        // are working only with the actual settings.

        if ($this->resource->relationLoaded('propertyBag')) {
            $this->resource->load('propertyBag');
        }

        return $this->sync();
    }
public function set(array $attributes)
    {
        collect($attributes)->each(function ($value, $key) {
            $this->setKeyValue($key, $value);
        });

        // If we were working with eagerly-loaded relation,
        // we need to reload its data to be sure that we
        // are working only with the actual settings.

        if ($this->resource->relationLoaded('propertyBag')) {
            $this->resource->load('propertyBag');
        }

        return $this->sync();
    }
public function set ( array $ attributes ) { collect ( $ attributes ) -> each ( function ( $ value , $ key ) { $ this -> setKeyValue ( $ key , $ value ) ; } ) ; // If we were working with eagerly-loaded relation, // we need to reload its data to be sure that we // are working only with the actual settings. if ( $ this -> resource -> relationLoaded ( 'propertyBag' ) ) { $ this -> resource -> load ( 'propertyBag' ) ; } return $ this -> sync ( ) ; }
Update or add multiple values to the settings table.

@param array $attributes

@return static
Update or add multiple values to the settings table .