PHP code example of kseven / laravel-pwa

1. Go to this page and download the library: Download kseven/laravel-pwa library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

kseven / laravel-pwa example snippets


return [

    'debug' => env('APP_DEBUG', false),

    'vapid_public' => env('VAPID_PUBLIC_KEY', null),

    'install-button' => true, // Show or hide install button globally

    'manifest' => [
        'name' => 'KSeven PWA',
        'short_name' => 'KSPWA',
        'description' => 'A Progressive Web Application setup for Laravel projects.',
        "version" => "0.0.0",
        'background_color' => '#000',
        'theme_color' => '#F12',
        "start_url" => "/?source=pwa",
        "scope" => "/",
        "display" => "standalone",
        "display_override" => ["standalone", "fullscreen"],
        "orientation" => "portrait-primary",
        "lang" => "pt-BR",
        "dir" => "ltr",
        "icons" => [
            [
                "src" => "/assets/images/96x96.png",
                "sizes" => "96x96",
                "type" => "image/png"
            ],
            [
                "src" => "/assets/images/192x192.png",
                "sizes" => "192x192",
                "type" => "image/png"
            ],
            [
                "src" => "/assets/images/512x512.png",
                "sizes" => "512x512",
                "type" => "image/png"
            ]
        ],
        "screenshots" => [
            [
                "src" => "/assets/images/screanshot1.jpg",
                "sizes" => "576x1280",
                "type" => "image/jpeg"
            ],
            [
                "src" => "/assets/images/screanshot2.jpg",
                "sizes" => "576x1280",
                "type" => "image/jpeg"
            ],
            [
                "src" => "/assets/images/screenshot-wide.jpg",
                "sizes" => "1365x605",
                "type" => "image/jpeg",
                "form_factor" => "wide"
            ]
        ],
        "categories" => ["general"],
        "shortcuts" => [
            [
                "name" => "KSeven",
                "short_name" => "KSeven",
                "description" => "Seu desenvolvedor...",
                "url" => "/",
                "icons" => [
                    [
                        "src" => "/assets/images/96x96.png",
                        "sizes" => "96x96",
                        "type" => "image/png"
                    ]
                ]
            ]
        ],
        "related_applications" => [
            [
                "platform" => "webapp",
                "url" => "https://kseven.com.br/"
            ],
            [
                "platform" => "play",
                "id" => "com.kseven.app"
            ]
        ],
        "prefer_related_applications" => false,
        "iarc_rating_id" => "e10+"
    ],

];
bash
php artisan ks:publish-laravel-pwa