How to run BacbPack for Laravel offline

34 Views Asked by At

How can I run backpack styles offline (download css & js locally)? I found a PR in v4 but have not found how to apply this

1

There are 1 best solutions below

0
Karan Datwani On

negm

You would require the internet once to copy assets from CDNs to your local server. The command php artisan basset:cache will go through all your blade files and internalize everything possible.

Notes:

  • Ensure that APP_URL in your .env matches your server configuration, including the hostname, protocol, and port number. Incorrect settings can lead to asset-loading issues.
  • Basset is disabled by default on the local environment. If you want to change it, please set BASSET_DEV_MODE=false
  • Don't forget to do the storage link in case you haven't done it already; it's in basset docs.

Find more info here