@extends('layout.app') @section('content') @php // LOGIKA BARU: Ambil nama role user menggunakan relasi pivot $user = auth()->user(); $userRole = 'Anggota'; if ($user && $user->anggota) { if ($user->anggota->roles->contains('nama_role', 'Pengurus')) { $userRole = 'Pengurus'; } elseif ($user->anggota->roles->contains('nama_role', 'Pelatih')) { $userRole = 'Pelatih'; } } @endphp
@if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@csrf @method('PUT')
Informasi Akun & Pribadi
* Email digunakan untuk login sistem
Informasi Organisasi
@if ($userRole != 'Pengurus') Anda hanya dapat mengubah data Anggota biasa. @endif
{{-- BOX SK HANYA DIBUKA UNTUK PENGURUS --}} @if ($userRole == 'Pengurus') @endif
@endsection