Download the PHP package jonnx/laravel-pwa without Composer

On this page you can find all versions of the php package jonnx/laravel-pwa. 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 laravel-pwa

Laravel PWA Package

Turn your Laravel application into a Progressive Web App (PWA) with push notifications and more.

Dependencies

Installation

  1. Install the package via Composer:

  2. Add Push Subscription Trait to User Model

  3. Publish the config and components:

Usage

PWA Install Banners

This package provides two install banners to help users install your PWA:

Include these components in your layout to provide a seamless install experience for all users:

Push Notification Setup

Vapid Keys

To enable push notifications, you need to generate VAPID API keys:

This will generate the required keys and update your .env and config/pwa.php files. Make sure to configure your environment and PWA settings accordingly.

User Model Push Subscription Trait

This trait automatically establishes the relationship from the user model to many push subscriptions. This way a user can opt-in to push notifications on multiple devices and receive notifications everywhere.

Web Push Subscription Handler

Use the push notification subscription handler Livewire component. This captures the subscription data and automatically saves it to the user on the back-end so that you can use the subscription to send notifications anytime.

User Permission Banner

Push notifications require active user opt-in on all browsers. Include this components in your layout to provide a seamless opt-in experience.

Testing Push Notifications

To simplify testing and debugging during setup, this package provides a component to test push notifications with. Include this component in any of your pages and click the button. A test push notification should appear on each of your user's subscribed devices.

Here is how it works:

Creating Your Own Push Notifications

Simple

This package provides a helper class you can use to create your own notifications quickly. the service worker is already setup to open the url on the user's device when they click the notification.

Advanced

The class we provide is just a simplified wrapper around DeclarativeWebPushMessage. To learn more about this, checkout the documentation here: https://github.com/laravel-notification-channels/webpush?tab=readme-ov-file#declarative-web-push-messages

Reacting to push events in the page

Whenever the service worker receives a push, it broadcasts a pwa:push message to every open client with the parsed payload. Subscribe from any page to refresh UI, show in-app toasts, etc:

Disable the broadcast via config/pwa.php:

Customizing Banner Components

The setup steps publish the banner components to a folder in your project so you can easily tweak appearance, position and more. The files are located in the resources/views/pwa folder.

Major Library Dependencies

Library Purpose
laravel/webpush Handles browser push notifications, VAPID key management, and subscription storage.
livewire/livewire Enables reactive components for subscription handling and real-time UI updates.
alpinejs Provides lightweight frontend interactivity for banners and install prompts.
notification-channels/webpush Adds push notification support to Laravel's notification system.

These libraries are required to:


For more details, see the package documentation or open an issue if you need help.

Contributing

Contributions are welcome! To contribute to this package:

  1. Fork the repository and create your branch from main.
  2. Make your changes, following PSR standards and best practices.
  3. Add or update tests as needed.
  4. Submit a pull request with a clear description of your changes.

If you have ideas, feature requests, or find bugs, please open an issue.


All versions of laravel-pwa with dependencies

PHP Build Version
Package Version
Requires laravel-notification-channels/webpush Version ^10.3
livewire/livewire Version ^3.0||^4.0
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 jonnx/laravel-pwa contains the following files

Loading the files please wait ...