Feat: Adding OrderReferenceDisplay Service that trims down order leading 0s

This commit is contained in:
2026-09-28 11:57:30 +03:00
parent effbce195c
commit 1214f9b748
10 changed files with 67 additions and 17 deletions
@@ -7,6 +7,7 @@ use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Support\Facades\Notification as NotificationFacade;
use Modules\Core\Notification\BaseNotification;
use Modules\Core\Order\Events\OrderStatusUpdated;
use Modules\Core\Order\Support\OrderReferenceDisplay;
class OrderStatusUpdatedNotification extends BaseNotification
{
@@ -52,10 +53,12 @@ class OrderStatusUpdatedNotification extends BaseNotification
{
$order = $this->event->order;
$reference = OrderReferenceDisplay::resolve($order);
return (new MailMessage)
->subject(__('Your order :reference has been updated', ['reference' => $order->reference]))
->subject(__('Your order :reference has been updated', ['reference' => $reference]))
->view('core::order.notifications.status-updated', [
'reference' => $order->reference,
'reference' => $reference,
'statusLabel' => config("lunar.orders.statuses.{$order->status}.label", $order->status),
]);
}