CodeIgniter Forums

Full Version: CI to progressive web app
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello All, 

Does anyone have any advice on converting to a PWA. I have tried to use this tutorial https://dev.to/pixeline/the-easy-way-to-...eb-app-77g but had no luck with upup as with its scope it (upup.sw file) will need to be in the controller dir or near the index.php file but, I have not been able to find out how to access it from those locations.
Anybody with solution pls
You can place these files next to your index.php file, and then they will be available from www.yourdomain.com/upup.min.js

Or, if you want to give it a specific subdirectory URL, you could create a special route that sends www.yourdomain.com/mysubfolder/upup.min.js to special controller method that loads real upup.min.js file contents and outputs it to browser as is, without adding any HTML via views.

I imagine you could also try creating real folders starting from index.php file, as typical .htaccess config for CodeIgniter only points "broken" links to index.php. I'm slightly sceptical of benefits doing it this way tho, as if you need show CI content at /subfolder1 but want to make /subfolder1/subfolder2/upup.min.js I'm 99% certain subfolder1 from .htaccess point of view is existing path, even if there are no index.html files in that folder.
(01-25-2019, 11:43 AM)Pertti Wrote: [ -> ]You can place these files next to your index.php file, and then they will be available from www.yourdomain.com/upup.min.js

Or, if you want to give it a specific subdirectory URL, you could create a special route that sends www.yourdomain.com/mysubfolder/upup.min.js to special controller method that loads real upup.min.js file contents and outputs it to browser as is, without adding any HTML via views.

I imagine you could also try creating real folders starting from index.php file, as typical .htaccess config for CodeIgniter only points "broken" links to index.php. I'm slightly sceptical of benefits doing it this way tho, as if you need show CI content at /subfolder1 but want to make /subfolder1/subfolder2/upup.min.js I'm 99% certain subfolder1 from .htaccess point of view is existing path, even if there are no index.html files in that folder.

Thanks for your reply but u see u said plenty tins now u lost me 
So pls provide a sample code show us how to implement  it laravel has a sample code codeigniter doesn't so pls provide one pls