dystcz/lunar-api-product-notifications
Laravel package that extends the Lunar API with product notification endpoints, enabling storefronts and integrations to create, list, and manage product-related notifications through a consistent JSON API. Designed for straightforward installation in Lunar ecommerce projects.
composer require dystcz/dystore-product-notifications, then publish and run the migrations/config (php artisan vendor:publish --tag="dystore-product-notifications-config" and ...-migrations, followed by php artisan migrate). The package builds on Dystore/Lunar, so a working Dystore store (products, variants, stock, customers) is a prerequisite.Stock model, and verify a notification lands in Notifications/Mailhog.^1.0 and treat the prior 1.0.x behavior as the baseline.Stock model/actions so the package's observers/events fire; a raw DB::table('...')->update() will silently skip notifications.ShouldQueue; set a dedicated queue (e.g. notifications) in config and run workers. This is the difference between a working feature and a request-timeout bug when a popular product restocks.Notification::fake() and assert assertSentTo/assertSentOnDemand; create subscriptions via factories, then move stock and assert dispatch. Add a test that a second restock does not re-notify already-notified subscribers.php artisan queue:work logs and failed_jobs first.notified_at/status column and only notify on the transition from zero/out-of-stock to in-stock.php artisan config:clear/config:cache — stale cached config is a common "my override isn't used" trap.^1.0, run your notification tests after bumping, and skim the GitHub compare for the 1.0.14→1.0.15 diff before deploying to production.How can I help you explore Laravel packages today?