public function all($keys = []) : Collection
	{
		if (count($keys) == 0) {
			$keys = $this->preferences->keys();
		}

		if (is_string($keys)) {
			$keys = [$keys];
		}

		return Collection::make($keys)->flatMap(function ($item) {
			if (isset($this->preferences[$item])) {
				$result[$item] = explode(',', $this->preferences[$item]);
			}
			return $result ?? [];
		});
	}
public function all($keys = []) : Collection
	{
		if (count($keys) == 0) {
			$keys = $this->preferences->keys();
		}

		if (is_string($keys)) {
			$keys = [$keys];
		}

		return Collection::make($keys)->flatMap(function ($item) {
			if (isset($this->preferences[$item])) {
				$result[$item] = explode(',', $this->preferences[$item]);
			}
			return $result ?? [];
		});
	}
public function all ( $ keys = [ ] ) : Collection { if ( count ( $ keys ) == 0 ) { $ keys = $ this -> preferences -> keys ( ) ; } if ( is_string ( $ keys ) ) { $ keys = [ $ keys ] ; } return Collection :: make ( $ keys ) -> flatMap ( function ( $ item ) { if ( isset ( $ this -> preferences [ $ item ] ) ) { $ result [ $ item ] = explode ( ',' , $ this -> preferences [ $ item ] ) ; } return $ result ?? [ ] ; } ) ; }
Takes the given keys from the preferences array.

@param  string|array $keys

@return Collection
Takes the given keys from the preferences array .