@props([ 'required' => '', 'type' => 'text', 'name' => '', 'label' => '', 'value' => '', 'disable' => '', ]) @if ($label === 'none') @elseif ($label === '') @php //remove underscores from name $label = str_replace('_', ' ', $name); //detect subsequent letters starting with a capital $label = preg_split('/(?=[A-Z])/', $label); //display capital words with a space $label = implode(' ', $label); //uppercase first letter and lower the rest of a word $label = ucwords(strtolower($label)); @endphp @endif
@if ($label !='none') @endif
@if($disable == 1) merge(['class' => 'block w-full dark:bg-gray-500 dark:text-gray-200 dark:placeholder-gray-200 border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-light-blue-500 focus:border-light-blue-500 sm:text-sm']) }}> @else merge(['class' => 'block w-full dark:bg-gray-500 dark:text-gray-200 dark:placeholder-gray-200 border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-light-blue-500 focus:border-light-blue-500 sm:text-sm']) }}> @endif @error($name)

{{ $message }}

@enderror