public function fill(array $attributes)
    {
        foreach ($attributes as $key => $value) {
            if (!in_array($key, $this->fillable)) {
                throw new ApplicationException(Lang::get(
                    'cms::lang.cms_object.invalid_property',
                    ['name' => $key]
                ));
            }

            $this->$key = $value;
        }
    }
public function fill(array $attributes)
    {
        foreach ($attributes as $key => $value) {
            if (!in_array($key, $this->fillable)) {
                throw new ApplicationException(Lang::get(
                    'cms::lang.cms_object.invalid_property',
                    ['name' => $key]
                ));
            }

            $this->$key = $value;
        }
    }
public function fill ( array $ attributes ) { foreach ( $ attributes as $ key => $ value ) { if ( ! in_array ( $ key , $ this -> fillable ) ) { throw new ApplicationException ( Lang :: get ( 'cms::lang.cms_object.invalid_property' , [ 'name' => $ key ] ) ) ; } $ this -> $ key = $ value ; } }
Sets the object attributes.
@param array $attributes A list of attributes to set.
Sets the object attributes .