Download the PHP package manhamprod/pwa-assets-generator without Composer
On this page you can find all versions of the php package manhamprod/pwa-assets-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download manhamprod/pwa-assets-generator
More information about manhamprod/pwa-assets-generator
Files in manhamprod/pwa-assets-generator
Package pwa-assets-generator
Short Description "A package to generate PWA assets such as icons, splash screens, and manifests.
License MIT
Informations about the package pwa-assets-generator
PwaAssetsGenerator
PwaAssetsGenerator is a package for generating Progressive Web App (PWA) assets such as app icons, splash screens, favicons, and manifests. It provides easy-to-use functions to automate the creation of essential assets for a PWA, making it simple to integrate them into your Laravel or PHP project.
Installation
To install PwaAssetsGenerator, you can require the package via Composer.
-
Add the package to your
composer.json: -
After installation, the service provider will be automatically registered if you are using Laravel. If not, register the
PwaAssetsGeneratorServiceProviderin yourconfig/app.phpfile under theprovidersarray: -
Add the alias for the
PwaAssetsGeneratorfacade to thealiasesarray: -
Publish the configuration file using the following Artisan command:
This will create a
pwaassetsgenerator.phpconfiguration file in theconfigdirectory of your Laravel project.
Usage
Generate App Icons
To generate app icons for your PWA:
Generate Splash Screens
To generate splash screens for your PWA:
Generate Manifest
To generate a manifest.webmanifest file:
Generate Favicon
To generate a favicon from letters:
Generate All Assets
To generate all the necessary assets (icons, splash screens, manifest, and favicon) in one call:
Include Splash Screen Links in Blade
To include the splash screen links dynamically in a Blade view:
This will load the splash screen links from the resources/views/partials/splash-screen-links.php file.
Configuration
You can customize the settings in the config/pwaassetsgenerator.php file. This includes:
- Icon sizes
- Splash screen sizes
- Output folder paths
- Background colors
- Fonts and more
License
This package is open-source and available under the MIT License.