AI store generator for ecommerce, Malaysia first. Laravel 13 + React + TypeScript.
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. namespace App\Enums;
  3. enum StoreCategory: string
  4. {
  5. case Fashion = 'fashion';
  6. case Beauty = 'beauty';
  7. case Food = 'food';
  8. case Home = 'home';
  9. case Electronics = 'electronics';
  10. case Health = 'health';
  11. case Kids = 'kids';
  12. case Digital = 'digital';
  13. case Other = 'other';
  14. public function label(): string
  15. {
  16. return match ($this) {
  17. self::Fashion => 'Fashion & apparel',
  18. self::Beauty => 'Beauty & skincare',
  19. self::Food => 'Food & beverage',
  20. self::Home => 'Home & living',
  21. self::Electronics => 'Electronics & gadgets',
  22. self::Health => 'Health & wellness',
  23. self::Kids => 'Baby & kids',
  24. self::Digital => 'Digital products',
  25. self::Other => 'Other',
  26. };
  27. }
  28. /**
  29. * Options for a select input.
  30. *
  31. * @return list<array{value: string, label: string}>
  32. */
  33. public static function options(): array
  34. {
  35. return array_map(
  36. fn (self $category) => ['value' => $category->value, 'label' => $category->label()],
  37. self::cases(),
  38. );
  39. }
  40. }