Laravel-Backpack / basset

Better asset helpers for Laravel apps.
MIT License
151 stars 10 forks source link

line awesome icons not show #100

Closed mzee19 closed 9 months ago

mzee19 commented 9 months ago

@tabacitu line awesome`s icons are not displaying after replacing the asset with Basset. Could you please fix this asap? image image

jcastroa87 commented 9 months ago

Hello @mzee19 did you try check config as our FAQ say:

The most common reasons for Basset to fail are:

Incorrect APP_URL in the .env file. 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.

Improperly configured disk. By default, Basset uses the Laravel public disk. For new Laravel projects, the configuration is usually correct. If you're upgrading a project and/or changed the public disk configuration, it's advised that you change the basset disk in config/backpack/basset.php to basset. The basset disk is a copy of the original Laravel public with working configurations.

Missing or broken storage symlink. If you use the default public disk, Basset requires that the symlink between the storage and the public accessible folder to be created with php artisan storage:link command. During installation, Basset attempts to create the symlink. If it fails, you will need to manually create it with php artisan storage:link. If you encounter issues (e.g., after moving the project), recreating the symlink should resolve them.

Cheers.

mzee19 commented 9 months ago

Thanks for your info, I already checked and implemented these steps, as you can recheck this it's the preferred Laravel storage default. It is a bug and should be preferred as a public folder instead of a storage folder. Because line-awesome has icons in public folder ( inside the line-awesome ) but it's not moved to the storage folder.

pxpm commented 9 months ago

Hello @mzee19 I think this may be related with the upgrade process. Did you follow it step by step ? I see you are still referencing files inside the packages folder and one of the steps was to remove that folder, since now stuff is loaded from CDN. Unless you are trying to load some local version of it, in that case you should basset() all the files needed by the font.

See here how we include line-awesome and some of it's variations: https://github.com/Laravel-Backpack/CRUD/blob/7e10acf5f60156964ebd25e8481f317826ea86e0/src/resources/views/ui/inc/styles.blade.php#L4

You should use a similar approach to load the font-awesome. If you only mention the .css, the "internal" links will not be moved to basset folder on caching and that may produce the errors you are experiencing.

Similar to the source-sans-pro, we already load it in theme-coreuiv2 if that's the one you are using (and should be using while upgrading). https://github.com/Laravel-Backpack/theme-coreuiv2/blob/a268b85e2c7ae9d8e0aa148a393163ad3b9ffcbf/resources/views/inc/theme_styles.blade.php#L5

Let me know if I can help you with something else.

Cheers

mzee19 commented 9 months ago

Sure I will apply on individual fonts ( .woff ) path in it, thanks for giving me the information.