forExport($this->search, $this->gender, $this->departmentId); } public function headings(): array { return [ 'NIDN', 'Nama Lengkap', 'Username', 'Email', 'Nomor Telepon', 'Jurusan', 'Jenis Kelamin', 'Tempat Lahir', 'Tanggal Lahir', 'Alamat', ]; } public function map($user): array { /** @var User $user */ return [ $user->lecturer?->lecturer_number ?? '-', $user->profile?->full_name ?? '-', $user->username, $user->email, $user->profile?->phone_number ?? '-', $user->lecturer?->departments->pluck('name')->join(', ') ?: '-', $user->profile?->gender?->label() ?? '-', $user->profile?->birth_place ?? '-', $user->profile?->birth_date?->format('d M Y') ?? '-', $user->profile?->address ?? '-', ]; } }