Icons

We have a few most used icons in the resources/views/icons directory. They are just svg files in .blade.php format. You can use them in your components like this:

        
use Patrikjak\Utils\Common\Enums\Icon;
 
{!! Icon::EYE->getAsHtml() !!} {{-- <svg>...</svg> --}}

If you want use img tag, you can use this:

        
<img src="{{ Icon::EYE->getImagePath() }}" alt="{{ Icon::EYE->value }}">

Or use it in blade with icon directive

        
@icon('eye')

If you need to change the color of the icon, you can use the fill property in CSS:

        
svg path {
fill: blue;
}

Custom icons

If you want to use custom icon, you can call the getCustomAsHtml method or getCustomImagePath method

Custom icons will be loaded from:

asHtml - resources/views/icons/{custom_icon}.blade.php

imagePath - public/images/icons/{custom_icon}.svg

        
{!! Icon::getCustomAsHtml('custom_icon') !!}
{{-- or --}}
<img src="{{ Icon::getCustomImagePath('custom_icon') }}" alt="custom_icon">

Available icons

check
warning
edit
trash
eye
eye_slash
circle_exclamation
info
sort
sort_asc
sort_desc
filter