@props(['icon' => 'home', 'class' => 'w-5 h-5']) @php $svgPath = public_path('zondicons/' . $icon . '.svg'); if (!file_exists($svgPath)) { $svgPath = public_path('zondicons/home.svg'); } $svgContent = file_get_contents($svgPath); // Extract path content from SVG preg_match('/>(.+?)<\/svg>/s', $svgContent, $matches); $pathContent = $matches[1] ?? ''; @endphp merge(['class' => $class]) }} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"> {!! $pathContent !!}