orchidsoftware / platform

Orchid is a @laravel package that allows for rapid application development of back-office applications, admin/user panels, and dashboards.
https://orchid.software
MIT License
4.26k stars 631 forks source link

Bootstrap icons can not load in platform screen #2662

Closed andares closed 11 months ago

andares commented 1 year ago

Describe the bug I'm not sure if this is a bug. Here's the situation: I'm using the following code in the commandBar() to build a button, but the icon is not displaying correctly. The Bootstrap icon is not loading. Can you please help me identify the possible reasons for this? Currently, the development environment is Laravel 9.x, and the Orchid version is 13.10.

To Reproduce Steps to reproduce the behavior:

  1. create a laravel project and install orchid platform.
  2. start web server for project.
  3. modify commandBar() to add an icon that resource name is 'bs.cloud' (or any other bootstrap icon name)
  4. refresh the browser, the bs icon is not work.

Expected behavior There is code in commandBar():

    public function commandBar(): iterable
    {
        return [
            Link::make('Cloud Service')
                ->href('https://portal.azure.com/')
                ->icon('bs.cloud'), // It's not work
        ];
    }

There is my composer.json require list:

        "doctrine/dbal": "^3.5",
        "guzzlehttp/guzzle": "^7.5",
        "laravel/framework": "^9.19",
        "laravel/sanctum": "^3.0",
        "laravel/tinker": "^2.7",
        "orchid/blade-icons": "^2.1",
        "orchid/platform": "^13.10",
        "twbs/bootstrap-icons": "^1.10",

No svg tag rendered:

图片

Server (please complete the following information):

Additional context

And it is not work by <x-orchid-icon /> tag too.

Thanks again.

andares commented 1 year ago

I try to make local custom icon, that's ok, no problem. Only bootstrap icon is not work.

tabuna commented 12 months ago

Hello. The default Bootstrap icons are only loaded starting from version 14.x. In version 13.x, we used our own icons, which you can find here:

Orchid Icon Pack

If you want to install and use Bootstrap icons separately, you can follow the instructions described here:

Docs for Custom icons

andares commented 12 months ago

Understood, thanks for your response! By the way, is it necessary to have Laravel 10 in order to install orchid 14? I followed the steps in the documentation, but I ended up with version 13.