@php $isExpired = false; if (auth()->check()) { $penghuni = \App\Models\Penghuni::where('email', auth()->user()->email)->first(); if ($penghuni && $penghuni->status_huni == 'Kontrak' && $penghuni->tanggal_keluar) { $isExpired = now()->gt(\Carbon\Carbon::parse($penghuni->tanggal_keluar)); } } @endphp {{-- 🔔 NOTIFIKASI REALTIME --}} @if(session('success'))
{{ session('success') }}
×
@endif @if(session('error'))
{{ session('error') }}
×
@endif
@if(auth()->check()) {{-- 🔥 ADMIN --}} @if(auth()->user()->role == 'admin') @include('components.sidebar') @endif {{-- 🔥 RT --}} @if(auth()->user()->role == 'rt') @include('components.sidebar_rt') @endif @endif
@if(auth()->check() && auth()->user()->role == 'user')
{{-- LOGO --}}
GREEN VIEW
{{-- TOGGLE --}}
{{-- MENU --}}
Beranda
Rumah
Iuran
{{-- DROPDOWN --}}
@if($isExpired) {{-- ❌ KONTRAK HABIS --}}
Pengaduan
@else {{-- ✅ MASIH AKTIF --}}
Pengaduan
✍️ Buat Pengaduan
📊 Status Pengaduan
@endif
{{--
Pengumuman
--}}
🌙
{{-- PROFILE --}}
{{ auth()->user()->name }}
{{-- LOGOUT --}}
@csrf
@endif @yield('content')
Ready to Leave?
×
Select "Logout" below if you are ready to end your current session.
@yield('scripts')