PHP code example of fof / pwa

1. Go to this page and download the library: Download fof/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/ */

    

fof / pwa example snippets


use Flarum\Extend;
use FoF\PWA\Extend as PwaExtend;

return [
    (new Extend\Conditional())
        ->whenExtensionEnabled('fof-pwa', fn () => [
            (new PwaExtend\Manifest())
                ->modify(function (array $manifest): array {
                    $manifest['categories'] = ['social'];
                    return $manifest;
                }),
        ]),
];