Asset on laravel and PWA
Recently I was working on making one of my web app as PWA. I understand PWA is future, hence I try to make my website based solution into a web app. And I came across an issue with sharing the resources. Specifically icons, images and splash screens.
And I came across {{ asset( ) }} really powerful syntax to take care of such issue. Asset syntax takes public directory as default and whatever path we put in, get added to public path. So however you host, the path always remain constant.
Also, {{ secure_asset() }} generates URL with https while {{ asset( ) }} generates URL with http.
To make laravel based project a PWA, you have following GitHub repos.
https://github.com/silviolleite/laravel-pwa
And you can generate PWA assets with this free app. It’s a website help create assets as well as manifest.