@props(['path', 'as' => 'span']) @php $tag = in_array($as, ['b', 'div', 'em', 'h2', 'h3', 'h4', 'li', 'p', 'small', 'span', 'strong'], true) ? $as : 'span'; @endphp <{{ $tag }} data-edit="{{ $path }}" {{ $attributes }}>{{ $slot }}