AI store generator for ecommerce, Malaysia first. Laravel 13 + React + TypeScript.
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

OrderStatus.php 631B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace App\Enums;
  3. enum OrderStatus: string
  4. {
  5. /** The shopper started checkout but has not paid (yet). */
  6. case Pending = 'pending';
  7. case Paid = 'paid';
  8. /**
  9. * Still not paid a day later: the shopper gave up. The double-check stops asking about it.
  10. * A payment that still arrives (from the webhook or the shopper's return page) marks it paid.
  11. */
  12. case Unpaid = 'unpaid';
  13. public function label(): string
  14. {
  15. return match ($this) {
  16. self::Pending => 'Awaiting payment',
  17. self::Paid => 'Paid',
  18. self::Unpaid => 'Not paid',
  19. };
  20. }
  21. }