How to add icon to admin panel?
-
Is there anyway to add custom icon to admin side bar?
-
@acxy99
yes you can create your own custom menu at admin end.
follow this link https://devdocs.bagisto.com/1.x/packages/add_menu_in_admin.htmlif you still persist any issue please let us know.
-
How do I configure the new icon that I desired to include in my project
-
@acxy99
you can pass your own icon class in 'icon-class' inside admin-menu.phpthen make sure to run php artisan config:cache from the bagisto root directory
-
May I know where the icon file is put and the configuration? because I follow your guide and it still not showing the icon.
P/s: Icon file is svg file -
@acxy99
You can put svg file to this directory.
package name -> Resources -> assets -> images -> icon.svgAfter that make a css class in scss file. And use background: url(); to call your svg file.
Later use that css class in menu.php or anywhere else you want. -
@aayush-bhatt172
Can do this in Webkul package? I can't change the dashboard icon also. -
Hi @acxy99,
You can do this in webkul package. Did you compile your assets in your admin package?
-
@devansh-webkul yeas. just figured it out this morning. thank you for the reply
-
@devansh-webkul said in How to add icon to admin panel?:
Did you compile your assets in your admin package?
I compile the asstes
98% after emitting SizeLimitsPluginDONE Compiled successfully in 7311ms 11:26:53
Asset Size Chunks Chunk Names /css/app.css 179 KiB /js/app [emitted] /js/app /js/app.js 1.42 MiB /js/app [emitted] /js/app
images/Coins.svg?239076bd8c0680f409663583df17ea52 2.48 KiB [emitted]
this error is occuring now.. Icon is not visible also