diff --git a/Config/config.php b/Config/config.php index 3e94983..ca4a260 100644 --- a/Config/config.php +++ b/Config/config.php @@ -5,6 +5,7 @@ 'manifest' => [ 'name' => env('APP_NAME', 'My PWA App'), 'short_name' => 'PWA', + 'description' => 'PWA Description', 'start_url' => '/', 'background_color' => '#ffffff', 'theme_color' => '#000000', @@ -63,7 +64,8 @@ 'description' => 'Shortcut Link 1 Description', 'url' => '/shortcutlink1', 'icons' => [ - "src" => "/images/icons/icon-72x72.png", + "src" => "/images/icons/icon-192x192.png", + "sizes" => "192x192", "purpose" => "any" ] ], diff --git a/Services/ManifestService.php b/Services/ManifestService.php index c7afd79..befb3c9 100644 --- a/Services/ManifestService.php +++ b/Services/ManifestService.php @@ -16,6 +16,7 @@ public function generate() $basicManifest = [ 'name' => config('laravelpwa.manifest.name'), 'short_name' => config('laravelpwa.manifest.short_name'), + 'description' => config('laravelpwa.manifest.description'), 'start_url' => asset(config('laravelpwa.manifest.start_url')), 'display' => config('laravelpwa.manifest.display'), 'theme_color' => config('laravelpwa.manifest.theme_color'), @@ -38,6 +39,7 @@ public function generate() if (config('laravelpwa.manifest.shortcuts')) { foreach (config('laravelpwa.manifest.shortcuts') as $shortcut) { + $icon = []; if (array_key_exists("icons", $shortcut)) { $fileInfo = pathinfo($shortcut['icons']['src']); $icon = [ @@ -46,10 +48,8 @@ public function generate() 'purpose' => $shortcut['icons']['purpose'] ]; if(isset($shortcut['icons']['sizes'])) { - $icon["sizes"] = $shortcut['icons']['sizes']; + $icon['sizes'] = $shortcut['icons']['sizes']; } - } else { - $icon = []; } $basicManifest['shortcuts'][] = [