Download the PHP package inlayphp/notifications without Composer

On this page you can find all versions of the php package inlayphp/notifications. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package notifications

Inlay Notifications

inlayphp/notifications is the transport layer for application feedback in Laravel and Inertia applications. It keeps the familiar fluent API while making the payload safe for React, Vue, JSON, queued, session, and database boundaries.

The React and Vue toast renderers also listen for the browser event inlay:notification. Renderer-neutral components can dispatch the same validated contract without depending on a specific frontend adapter:

Installation

The package is included by inlayphp/inlay, or can be installed directly:

Laravel discovers Inlay\\Notifications\\NotificationsServiceProvider automatically. The service provider registers a manager and, when Inertia is installed, shares inlayNotifications with every Inertia response.

Sending a notification

make() may be called without a title when a title is supplied later with title() or heading(). A title is required when the notification is serialized. The supported statuses are success, info, warning, and danger.

Use persistent() or duration(null) for notifications that require an explicit dismissal. Link actions accept the same safe URL contract as the rest of Inlay and reject JavaScript, data, protocol-relative, and unsupported schemes.

Database delivery

Session delivery is the default for redirect toasts. Install the optional database migration when a notification should remain available in a user's notification center:

The database methods use Laravel's bound database manager at runtime; the package keeps illuminate/database optional so session-only applications do not install database support just to render toasts.

The notifiable model must expose Laravel's usual getKey() and getMorphClass() methods:

databaseNotifications() returns the original transport-safe data payload plus database_id, read_at, and created_at. Every query is scoped by both the morph class and key; callers do not receive another user's records. The database API is intentionally transport-neutral so a panel can expose it as an Inertia prop, JSON endpoint, or custom React/Vue notification center.

Delivery contract

Each record is serialized as inlay.notifications.v1:

NotificationManager::pull() consumes the queue once. With a Laravel session, records survive a redirect; without a request/session, the manager keeps an in-memory queue for tests, CLI commands, and custom transports. No closures or HTML are transported.

Rendering

Mount one renderer at the application shell so every panel, standalone form, and resource page uses the same surface:

The React and Vue packages normalize untrusted page props, re-check action URLs, use live-region semantics, auto-dismiss timed records, and share Inlay theme tokens. Status cards use success-surface, info-surface, warning-surface, and danger-surface, while their text and borders use the matching semantic status tokens. Consequently a Panel theme or standalone token override updates toasts, the unread badge, and the notification center in both light and dark mode.

For a persistent notification center, pass the rows returned by databaseNotifications() to NotificationCenter. Both renderers expose the same callback surface, so the server remains the authority for read state:

The center is intentionally transport-neutral: expose the database rows from an Inertia prop or JSON endpoint and authorize each read mutation in Laravel.


All versions of notifications with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/container Version ^12.0 || ^13.0
illuminate/http Version ^12.0 || ^13.0
illuminate/support Version ^12.0 || ^13.0
inlayphp/support Version ^0.3 || dev-main
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package inlayphp/notifications contains the following files

Loading the files please wait ...