Skip to main content
Back to packages
178 GitHub stars

eramitgupta/laravel-pwa

View on GitHub

Description

A simple and easy-to-use Laravel PWA (Progressive Web App) package for Laravel applications.

To integrate PWA functionality into your layouts, use the provided Blade directives.

1. Add Meta Tags

Place the @PwaHead directive inside the <head> tag of your main layout file:

<!DOCTYPE html>
<html lang="en">
<head>
@PwaHead <!-- Add this directive to include the PWA meta tags -->
<title>Your App Title</title>
</head>
<body>

2. Register Service Worker

Just before the closing </body> tag in your main layout file, add:

@RegisterServiceWorkerScript <!-- This registers the service worker -->
</body>
</html>

These directives will automatically generate the necessary tags and JavaScript for the PWA.

Recent Courses on Laravel Daily