Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
L

laravel-pwa

> 编程语言
Open source

Looks like an app, feels like an app, but IS NOT an app.

1.1K stars0 likes1 views
WebsiteGitHub

About

Looks like an app, feels like an app, but IS NOT an app.

Laravel (PWA) Progressive Web Application

This Laravel package turns your project into a progressive web app. Navigating to your site on an Android phone will prompt you to add the app to your home screen.

Launching the app from your home screen will display your app. As such, it's critical that your application provides all navigation within the HTML (no reliance on the browser back or forward button).

See too the Laravel PWA Demo

Requirements

Progressive Web Apps require HTTPS unless being served from localhost. If you're not already using HTTPS on your site, check out Let's Encrypt and ZeroSSL.

Installation

Add the following to your composer.json file :

json
"require": {
    "silviolleite/laravelpwa": "~2.0.3",
},

or execute

bash
composer require silviolleite/laravelpwa --prefer-dist

Publish

bash
$ php artisan vendor:publish --provider="LaravelPWA\Providers\LaravelPWAServiceProvider"

Configuration

Configure your app name, description, icons and splashes in config/laravelpwa.php.

…

You can specify the size of each icon as key of the array or specify it:

[
    'path' => '/images/icons/icon-512x512.png',
    'sizes' => '512x512',
    'purpose' => 'any'
],

Obs: In the custom tag you can insert personalized tags to manifest.json like this e.g:

php
...
'custom' => [
    'tag_name' => 'tag_value',
    'tag_name2' => 'tag_value2',
    ...
]
...

Include within your `` the blade directive @laravelPWA.

xml

    My Title
    ...
    @laravelPWA

    ...
    My content
    ...

This should include the appropriate meta tags, the link to manifest.json and the serviceworker script.

how this example:

xml

Troubleshooting

While running the Laravel test server:

  1. Verify that /manifest.json is being served
  2. Verify that /serviceworker.js is being served
  3. Use the Application tab in the Chrome Developer Tools to verify the progressive web app is configured correctly.
  4. Use the "Add to homescreen" link on the Application Tab to verify you can add the app successfully.

The Service Worker

By default, the service worker implemented by this app is:

…

To customize service worker functionality, update the public_path/serviceworker.js.

The offline view

By default, the offline view is implemented in resources/views/vendor/laravelpwa/offline.blade.php

xml
@extends('layouts.app')

@section('content')

    
You are currently not connected to any networks.

@endsection

To customize update this file.

Contributing

Contributing is easy! Just fork the repo, make your changes then send a pull request on GitHub. If your PR is languishing in the queue and nothing seems to be happening, then send Silvio an email.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

PHP

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言