OrderStatus::payment($this)); Order::macro('fulfillmentStatus', fn () => OrderStatus::fulfillment($this)); Event::listen(ShipmentStatusUpdatedByCarrier::class, DeriveOrderDeliveredFromShipment::class); Event::listen(PaymentCaptured::class, ApplyResolvedPaymentStatus::class); Event::listen(PaymentAuthorized::class, ApplyResolvedPaymentStatus::class); NotificationRegistry::get()->register([ OrderDeliveredNotification::class, OrderStatusUpdatedNotification::class, OrderRefundedNotification::class, OrderCapturedNotification::class, ]); // Lets the consuming app override copy/markup without forking core // — published into resources/views/vendor/core/order/notifications, // which loadViewsFrom() (CoreServiceProvider) already resolves // ahead of the package's own views for the `core::` namespace. $this->publishes([ __DIR__ . '/../../resources/views/order/notifications' => resource_path('views/vendor/core/order/notifications'), ], 'core-views'); } }