Skip to content

Commit 0fd961e

Browse files
committed
Add error handling for missing blade-ui-kit/blade-icons dependency in Icon class
1 parent 693058b commit 0fd961e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Support/Html/Elements/Icon.php

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ class Icon extends BaseElement
1010

1111
public function svg(?string $name = null, ?string $class = null, ?array $attributes = []): static
1212
{
13+
throw_if(! function_exists('svg'), 'Make sure blade-ui-kit/blade-icons is installed');
14+
1315
return $this->html(svg($name, $class, $attributes)->toHtml());
1416
}
1517
}

0 commit comments

Comments
 (0)