Download the PHP package mxent/pwax without Composer
On this page you can find all versions of the php package mxent/pwax. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package pwax
Short Description Progressive Web App built with Laravel & Vue
License MIT
Homepage https://github.com/mxent/pwax
Informations about the package pwax
mxent/pwax
Progressive Web App built with Laravel & Vue
A Laravel package that seamlessly integrates Vue 3, Vue Router, and Pinia to build Progressive Web Applications with dynamic component loading and SPA-like experiences.
Features
- 🚀 Vue 3 Integration - Modern reactive framework with Composition API support
- 🛣️ Vue Router - Client-side routing with hash or history mode
- 🗄️ Pinia State Management - Official Vue state management library
- 📦 Dynamic Component Loading - Load Vue components on-demand via AJAX
- ⚡ Code Minification - Automatic JS/CSS minification for optimal performance
- 🎨 Customizable - Extensive configuration options for plugins, directives, and middleware
- 🔄 Hot Module Injection - Dynamically inject CSS, JavaScript, and templates from Blade views
Requirements
- PHP >= 8.2
- Laravel >= 12.0
- Composer
Installation
Install the package via Composer:
The service provider is auto-discovered by Laravel. After installation, run:
This publishes config/pwax.php. Pass --views to also publish the bundled
Blade views, and --force to overwrite existing files.
Configuration
Publish the configuration file manually if you prefer:
Key options in config/pwax.php:
Progressive Web App
Pwax serves a Web App Manifest at /manifest.webmanifest and a service
worker at /service-worker.js. The bundled <head> partial already
emits the <link rel="manifest"> and theme-color meta tags.
To enable the service worker, set service_worker.enabled = true in
config/pwax.php. The worker template can be customised by publishing it:
Publishing Views
Publish the view files to customize the layout:
This publishes views to resources/views/vendor/pwax/.
Usage
Creating a Vue Component
Create a Blade view that contains <template>, <script>, and <style> sections:
Rendering a Component
In your controller, use the vue() helper function:
Routing
Define your routes as usual in routes/web.php:
Use the router() helper to generate Vue Router compatible paths:
Dynamic Imports
Use the import() helper to dynamically import components:
Advanced Configuration
Custom Plugins
Register custom Vue plugins in config/pwax.php:
Custom Directives
Add custom Vue directives:
Middleware
Execute JavaScript before component loads:
Security Best Practices
- ⚠️ View Names: Only use trusted view names. The package validates view names to prevent path traversal attacks.
- 🔒 Config Values: Avoid adding user-supplied data directly to config arrays like plugins or directives.
- 🛡️ CSRF Protection: Ensure CSRF tokens are included in AJAX requests if modifying data.
- 📝 Input Validation: Always validate and sanitize user input in your components.
Testing
The test suite uses Orchestra Testbench:
Coverage report:
Changelog
See CHANGELOG.md for version history and updates.
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for details.
License
This package is open-sourced software licensed under the MIT license.
Credits
- Mxent Open Source Team
- All Contributors
Support
For issues, questions, or feature requests, please open an issue on GitHub.
All versions of pwax with dependencies
laravel/framework Version ^12.0|^13.0
matthiasmullie/minify Version >=1.3