沒有分店資料會錯的問題 20250616

This commit is contained in:
allen.yan 2025-06-16 23:14:31 +08:00
parent 6a93b717e7
commit eac66d8545

View File

@ -1,8 +1,9 @@
@php
use App\Models\Branch;
$branch= Branch::findOrFail(1);
$branch= Branch::first();
@endphp
@if ($branch)
<x-admin.section-header title="{{ $branch->name .' '. __('rooms.list').' '. $branch->external_ip}}">
<x-wireui:button
wire:click="$dispatchTo('forms.room-form', 'openModal')"
@ -10,4 +11,7 @@ $branch= Branch::findOrFail(1);
label="{{ __('rooms.CreateNew') }}"
class="bg-blue-600 text-white"
/>
</x-admin.section-header>
</x-admin.section-header>
@else
<x-admin.section-header title="{{__('rooms.list')}}"></x-admin.section-header>
@endif