Skip to content

Commit

Permalink
check if icon exists
Browse files Browse the repository at this point in the history
  • Loading branch information
3x1io committed Jul 21, 2024
1 parent 754c18b commit 30a1259
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions resources/views/icon-column.blade.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
@php
$iconExists = false;
try {
app(\BladeUI\Icons\Factory::class)->svg($getState());
$iconExists = true;
}catch (\Exception $e){}
if($getState()){
try {
app(\BladeUI\Icons\Factory::class)->svg($getState());
$iconExists = true;
}catch (\Exception $e){}
}
@endphp
@if($iconExists)
<div>
Expand Down

0 comments on commit 30a1259

Please sign in to comment.