protected function updateCategories(Collection $data)
	{
		$ids = explode(',', $this->preferences['product_categories']);

		$categories = Collection::make($ids)
			->merge($data)
			->unique()
			->take(self::MAX_TAGS)
			->implode(',');

		$this->preferences['product_categories'] = trim($categories, ',');
	}
protected function updateCategories(Collection $data)
	{
		$ids = explode(',', $this->preferences['product_categories']);

		$categories = Collection::make($ids)
			->merge($data)
			->unique()
			->take(self::MAX_TAGS)
			->implode(',');

		$this->preferences['product_categories'] = trim($categories, ',');
	}
protected function updateCategories ( Collection $ data ) { $ ids = explode ( ',' , $ this -> preferences [ 'product_categories' ] ) ; $ categories = Collection :: make ( $ ids ) -> merge ( $ data ) -> unique ( ) -> take ( self :: MAX_TAGS ) -> implode ( ',' ) ; $ this -> preferences [ 'product_categories' ] = trim ( $ categories , ',' ) ; }
Updates the user categories key with the given collection.

@param  Collection $data

@return void
Updates the user categories key with the given collection .