## Getting Started
Install via Composer:
```bash
composer require afatmustafa/blade-hugeicons
Publish the SVG assets (if needed) and configure via config/hugeicons.php. The package now uses Hugeicons Free v4 by default. Test basic usage with:
@hugeicon('container') <!-- Now renders correctly with strokes -->
Verify older icons (e.g., container-truck) still work. Clear Blade cache after installation:
php artisan view:clear
Use @hugeicon('icon-name') directly in Blade templates. For dynamic icons, pass variables:
@hugeicon($dynamicIconName)
Override default SVG attributes via config:
'hugeicons' => [
'default_attributes' => [
'class' => 'text-blue-500',
'width' => '24',
'height' => '24',
],
],
Enable caching for performance (recommended for production):
'hugeicons' => [
'cache' => true, // Default: false
],
Clear cache after updates:
php artisan view:clear
Extend the package by publishing SVGs and modifying resources/svg:
php artisan vendor:publish --tag=hugeicons-assets
container now render correctly, but older configs relying on fill="currentColor" may need adjustment. Explicitly set fill="none" in custom SVGs if strokes disappear.php artisan view:clear after upgrading to v2.0.1.Blank Icons?
Check if the SVG file exists in resources/svg (or published assets). Verify the icon name matches the filename (e.g., container.svg).
ls resources/svg | grep container
Stroke Issues
Ensure the root <svg> tag includes fill="none" (added in v2.0.1). Override via config if needed:
'default_attributes' => ['fill' => 'none'],
Performance
Disable caching ('cache' => false) during development to see real-time changes.
resources/svg. Update Blade usage accordingly.@hugeicon('container', ['style' => 'color: var(--icon-color)'])
NO_UPDATE_NEEDED (for prior assessments; this is a **full replacement** due to breaking changes and new patterns).
How can I help you explore Laravel packages today?