@include('livewire.admin.assignment.partials.messages', ['messages' => $assingment_messages])
@include('livewire.admin.assignment.partials.activity-log', ['logs' => $assignment_logs])
@php use App\Models\User; use Illuminate\Support\Facades\Auth; $alloffices = []; $showsidebar='YES'; if (Auth::user()->role == User::ROLE_OFFICE_ADMIN) { // Check and explode multiple franchise if (Auth::user()->multiple_franchise) { $alloffices = explode(',', Auth::user()->multiple_franchise); } else { $alloffices = []; } // Add main franchise $alloffices[] = Auth::user()->franchise_id; // Remove duplicates $alloffices = array_unique($alloffices); if (!in_array($assignment->franchise_id, $alloffices)) { $showsidebar='NO'; } } @endphp
Send Message as
@if($showsidebar=='YES') @endif
@if($showsidebar=='YES')  Adjuster    Appraiser    Owner    Insurance company    Body Shop   @endif  Admin Only  
 Adjuster    Appraiser    Owner    Insurance company    Body Shop  
@error('subject')
{{ $message }}
@enderror
@error('message')
{{ $message }}
@enderror
@if (session()->has('success')) @endif @if (session()->has('error')) @endif