---
url: /inertia-notifications/docs/backend-differences.md
description: >-
  Compare storage, delivery, background work and test support in Laravel PHP and
  Laravel Rust.
---

# Backend Differences

Laravel PHP and Laravel Rust both support redirect and JSON toasts, inbox notifications, read state, announcements and preferences. The Vue and React components use the same data and endpoints. The table shows how each backend handles storage, delivery and background work.

| Area | Laravel PHP | Laravel Rust |
| --- | --- | --- |
| [Installation and storage](/installation) | Composer discovers the provider. Publish and run Laravel migrations. The package tests SQLite, MySQL and PostgreSQL. | Register `Notifications::sqlite()` to use the application’s default SQLite connection. It creates its own tables at boot. Applications using MySQL or PostgreSQL for other data can supply a dedicated SQLite pool for notifications. |
| [Recipients and routes](/notification-center/setup) | Add `HasInbox` and register `Route::inertiaNotifications()` with the desired middleware. The provider shares the inbox prop. | Implement `Receives<Inbox>` on the authenticated model. The provider registers session-authenticated endpoints. The notifications middleware shares the inbox automatically. |
| [Sending and retrying](/notification-center/sending-notifications) | Return `inbox` from `via` and build a message in `toInbox`. An Artisan command scaffolds the notification. | Use `#[via(Inbox)]` and return an `InboxDelivery`. The delivery generates a UUID before queueing. Supply your own with `with_id` when dispatching the same event separately. There is no package notification generator. |
| [Preferences across channels](/preferences/setup) | Package listeners on `NotificationSending` enforce preferences, pauses, notification hours, and digest decisions for configured channels. | The inbox channel applies its own rules. For mail and other external channels, call `delivery_decision` before sending and honor its result. The package has no global listener for those channels. |
| [Read delays](/notification-center/sending-notifications#waiting-for-a-read) | The notification trait integrates with Laravel's queue to delay selected channels. | Set the delay on the message and schedule the external channel in your worker. Check the decision with the original delivery UUID when the job runs. |
| [Digest delivery](/preferences/digests) | Schedule the package’s Artisan command. It sends a Laravel notification and includes a Blade mail template. | Schedule `center.digests.send_due` and supply the mail or channel transport. The renderer produces HTML and plain text. The runnable worker example writes to a SQLite outbox. |
| [Web Push](/notification-center/web-push) | Artisan commands manage VAPID keys and diagnostics. Laravel jobs send pushes and auth listeners clean up devices. | Configure a push service and a stable cookie key. Use the standalone `inertia-notifications-push` CLI to generate keys, diagnose, test or drain deliveries. Login and logout handlers call `PushDevice::after_login` or `after_logout` to update the browser’s device cookie. |
| [Snoozes and retention](/notification-center/configuration#pruning) | Schedule `inertia-notifications:unsnooze` and Laravel’s `model:prune`. | The provider registers `inertia-notifications:unsnooze`. Schedule `center.inbox.prune` separately with a retention cutoff. |
| [Teams](/notification-center/teams-and-tenants) and [announcements](/notification-center/announcements) | Team context can use an Eloquent model and routes can use team parameters. | Supply trusted context and audience keys on the recipient. The Laravel provider has a static prefix. The lower-level router can mount at a team-specific path. |
| [Translation](/toasts/flashing-from-laravel) | Toast text uses the Laravel translator; inbox messages can be translated when read. | Supply a toast translator and a recipient translator when you use a catalog. Queued routes retain the locale; the application must restore any translation callback needed in the worker. |
| [Backend tests](/notification-center/testing) | Use the package's Pest and PHPUnit assertions and Laravel fakes. | Use Laravel HTTP feature tests for handlers, the toast recorder for payloads, and an isolated SQLite store or injected transport for delivery tests. |

The PHP demo in `demo-app/` and the Rust demo in `rust/examples/laravel/` show how the backend and frontend fit together. Follow the [installation guide](/installation) to add notifications to your own app.
