Laravel 5.2 with PWA

General Tech Bugs & Fixes 2 years ago

0 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

I am using laravel version 5.2 and I am trying to make it a PWA. For long hours of searching google and stackoverflow I can't find any suitable guides that will help me to make my laravel 5.2 app a PWA.. Can anyone help me? Please Ive been trying for a weeks already. I also tried creating my own service worker and manifest but the dynamic URL is the problem it doesn't render anything it just return to 127.0.0.1/dashboard . I am still on my localhost so PWA is supported by it.

profilepic.png
manpreet 2 years ago

Your problem can is on the route, you need create a specific route to your manifest.json and to your worker.js. This is an example to manifest.json:

Route::get('/manifest.json', 'YourController@Action')->name('manifest');

In controller action you need response a json.

return response()->json([
    'name' => 'name',
    'short_name' => 'short name',
    'start_url' => '/',
    'display' => 'standalone',
    'theme_color' => '#000000',
    'background_color' => '#000000'
]);

0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.