Download the PHP package edu17/filament-pwa-plugin without Composer

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

Filament PWA Plugin

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Turn any FilamentPHP 4 panel into an installable Progressive Web App. Each panel receives its own manifest, service-worker scope, offline fallback, icons, and optional database-backed settings page.

Features

Requirements

Installation

Install the package:

Run the package installer:

The installer publishes the configuration, migration, default icons, and Filament assets. It asks whether it should run the migrations. Answer yes, or run them later with:

Register the plugin on every panel that should become a PWA:

The PWA endpoints are created below the panel path. A panel at /admin receives:

Manual installation

Instead of the installer, each step can be run manually:

When the settings page uses the default public disk, ensure Laravel's storage link exists:

Installing the development branch

Before a stable release is available on Packagist, the package can be installed directly from GitHub:

Basic configuration

The published config/pwa-plugin.php file defines the defaults shared by all registered panels:

Leave manifest.id, manifest.start_url, and manifest.scope as null to derive them from each panel path. This is the recommended setting for applications with multiple panels.

After changing a cached configuration file, clear Laravel's configuration cache:

Per-panel fluent configuration

Manifest values can be overridden on an individual panel:

Every fluent option accepts a closure that receives the current Panel:

Values saved from the settings page take precedence over fluent values and configuration defaults. Fluent values take precedence over config/pwa-plugin.php. The database overrides apply only while settings.enabled is true.

Settings page

The settings page can edit the application name, short name, description, colors, display mode, orientation, offline text, cache version, and icons independently for every managed panel.

The migration must be executed before setting settings.enabled to true.

Separate administration and PWA panels

For example, to display the settings page in superadmin while managing the PWA installed at admin:

Register the plugin on both panels. It can remain disabled as a PWA on the panel that only hosts the settings page:

One panel

A single panel can host the settings page and be the PWA it manages:

Register FilamentPwaPlugin::make() once in the admin panel provider.

Multiple panels

Both configuration values accept multiple panel IDs:

Every panel in either list must register the plugin. A managed panel can use ->enabled(false) when it should be configurable but should not expose PWA endpoints.

Settings authorization

The authorization method is optional and does not depend on a roles package.

Panel authentication only

Keep settings.ability as null. Any authenticated user who can access the panel containing the settings page can manage the configured PWA panels:

This is appropriate when access is already separated through Filament panels.

Laravel Gate or permission

Set an ability name:

Define the corresponding Gate in the application:

Packages that integrate permissions with Laravel's can() method can use a permission name as the ability.

Custom callback

Authorization can also be defined directly on the plugin instance that hosts the settings page:

The callback receives the authenticated user and the panel that hosts the settings page.

Icons

The installation command publishes default icons to public/vendor/filament-pwa-plugin/icons. They can be replaced manually or configured through the icons and apple_touch_icon options.

The manifest uses:

The Apple 180×180 icon is rendered separately as an apple-touch-icon link in the panel HTML.

The settings page accepts one square image of at least 512×512 pixels and up to 5 MB. It generates all four PNG variants. Generated files are stored on settings.disk under settings.directory/{panel}/icons.

Offline behavior

The service worker is scoped to the exact panel path. A panel at /admin handles /admin and /admin/..., but it does not handle /administrator or the rest of the Laravel application.

The default strategy:

Increment offline.cache_version after changing resources that may already be cached. Additional public same-origin URLs can be added to offline.precache.

Verify the installation

Replace admin with the path of the target panel and verify:

  1. Open /admin/manifest.webmanifest and confirm that it returns JSON with the expected name, start_url, scope, and icons.
  2. Open /admin/pwa-service-worker.js and confirm that it returns JavaScript with a Service-Worker-Allowed: /admin header.
  3. Open /admin/offline and confirm that the offline page renders.
  4. Open the panel over HTTPS and confirm in the browser developer tools that the service worker is activated and the manifest is installable.
  5. Test the offline fallback by enabling the browser's offline network mode and navigating within the panel.

Browsers may cache the manifest and installed application metadata. After changing the name, scope, display mode, or icons, increment the cache version, clear the site's application data, and reinstall the PWA when necessary.

Updating

After updating the package, publish new migrations and assets, run migrations, and refresh Filament's assets:

Do not use --force when publishing the configuration unless replacing local configuration changes is intentional.

Testing

Changelog

Please see CHANGELOG for information about recent changes.

Contributing

Please see CONTRIBUTING for details.

Security vulnerabilities

Please review our security policy to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of filament-pwa-plugin with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
filament/filament Version ^4.0
intervention/image Version ^3.0
spatie/laravel-package-tools Version ^1.15.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 edu17/filament-pwa-plugin contains the following files

Loading the files please wait ...