Skip to content

Instantly share code, notes, and snippets.

@icylace
Created December 19, 2025 15:28
Show Gist options
  • Select an option

  • Save icylace/9ff018477b0da0a514e88e7c2f8ab70f to your computer and use it in GitHub Desktop.

Select an option

Save icylace/9ff018477b0da0a514e88e7c2f8ab70f to your computer and use it in GitHub Desktop.
Just a simple Laravel Blade file
@php
if ($id !== null && !$enabledWhenBusy && !$attributes->has('data-indicator')) {
$attributes = $attributes->merge([
'data-indicator' => '_.'.$id.'_busy',
'data-attr:disabled' => '$_.'.$id.'_busy',
]);
}
if ($bind !== null) {
$attributes = $attributes->merge([
'data-bind' => $bind,
]);
}
@endphp
<button
{{ $attributes->merge([
'class' => 'x-button',
'type' => 'button',
]) }}
id="{{ $id }}"
name="{{ $name }}"
value="{{ $value }}"
@aria_required($required)
@disabled($disabled)
{{-- // TODO: --}}
{{-- @aria_disabled($disabled) --}}
>{{ $slot }}{{ $label }}</button>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment