PHP code example of bugo / moonshine-heroicons-field

1. Go to this page and download the library: Download bugo/moonshine-heroicons-field library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bugo / moonshine-heroicons-field example snippets


/*
 * Possible values:
 * 's', 'solid' - Solid 24x24, Solid fill
 * 'o', 'outline' - Outline 24x24, 1.5px stroke
 * 'm', 'mini' - Mini 20x20, Solid fill
 * 'c', 'micro' - Micro 16x16, Solid fill
 */
return [
    'style' => env('HEROICONS_STYLE', 'solid'),
];



declare(strict_types=1);

namespace App\MoonShine\Resources;

use Bugo\MoonShine\Heroicons\Fields\Icon;
use MoonShine\Resources\ModelResource;

/**
 * @extends ModelResource<Custom>
 */
class CustomResource extends ModelResource
{
    public function fields(): array
    {
        return [
            Icon::make('Icon')
                ->searchable()
                ->style('mini'),
        ];
    }
}
ini
HEROICONS_STYLE=outline
bash
php artisan vendor:publish --tag=heroicons-field