private function _saveDropdownOptions($attribute, $request)
    {
        if (null !== $request->get('dropdown-options')) {
            if (null != $attribute->attributeDropdownOptions()->get() &&
                $attribute->attributeDropdownOptions()->get()->count() >= 0
                ) {
                $attribute->attributeDropdownOptions()->delete();
            }

            foreach ($request->get('dropdown-options') as $key => $val) {
                if ($key == '__RANDOM_STRING__') {
                    continue;
                }

                $attribute->attributeDropdownOptions()->create($val);
            }
        }
    }
private function _saveDropdownOptions($attribute, $request)
    {
        if (null !== $request->get('dropdown-options')) {
            if (null != $attribute->attributeDropdownOptions()->get() &&
                $attribute->attributeDropdownOptions()->get()->count() >= 0
                ) {
                $attribute->attributeDropdownOptions()->delete();
            }

            foreach ($request->get('dropdown-options') as $key => $val) {
                if ($key == '__RANDOM_STRING__') {
                    continue;
                }

                $attribute->attributeDropdownOptions()->create($val);
            }
        }
    }
private function _saveDropdownOptions ( $ attribute , $ request ) { if ( null !== $ request -> get ( 'dropdown-options' ) ) { if ( null != $ attribute -> attributeDropdownOptions ( ) -> get ( ) && $ attribute -> attributeDropdownOptions ( ) -> get ( ) -> count ( ) >= 0 ) { $ attribute -> attributeDropdownOptions ( ) -> delete ( ) ; } foreach ( $ request -> get ( 'dropdown-options' ) as $ key => $ val ) { if ( $ key == '__RANDOM_STRING__' ) { continue ; } $ attribute -> attributeDropdownOptions ( ) -> create ( $ val ) ; } } }
Save Attribute Drop down Options.

@param \AvoRed\Framework\Models\Database\Attribute $attribute
@param \AvoRed\Ecommerce\Http\Requests\AttributeRequest $request
@return void
Save Attribute Drop down Options .