{{ $title }} @if(auth()->user()->role === 'super_admin') Tambah Kelompok Tani @endif @if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
{{-- Tabel Data Kriteria --}}
@forelse ($users as $index => $user) @empty @endforelse
Kelompok Tani ID Name Username Password Role Aksi
{{ $user->kelompokTani->isNotEmpty() ? $user->kelompokTani->pluck('nama')->join(', ') : '-' }} {{ $user->id }} {{ $user->name }} {{ $user->username }} •••••• {{ $user->role }} @php $auth = auth()->user(); @endphp @if ( $auth->id !== $user->id && // Tidak bisa hapus diri sendiri ( $auth->role === 'super_admin' || // super_admin bisa hapus siapa saja kecuali dirinya ($auth->role === 'admin' && $user->role !== 'admin') // admin hanya boleh hapus user biasa ) ) @endif
Tidak ada data User.
@if(session('success')) @endif @foreach ($users as $user) @endforeach @foreach ($users as $user) @endforeach