osb/resources/views/components/button/status.blade.php

6 lines
428 B
PHP
Raw Permalink Normal View History

<span {{ $attributes->class([
'badge',
'badge-success'=>($status === 'active'),
'badge-warning'=>($status === 'inactive'),
'badge-danger'=>($status === 'cancelled'),
])->except(['status','substatus']) }}>{{ $slot->isNotEmpty() ? $slot : strtoupper($status) }}</span> @if($slot->isEmpty() && (! in_array($status,['active','cancelled'])) && isset($substatus) && $substatus)<small>[{{ strtoupper($substatus) }}]</small> @endif