@php $currentId = null; $currentNama = null; if (isset($idencrypt) && !empty($idencrypt)) { try { $currentId = decrypt($idencrypt); } catch (\Throwable $e) { $currentId = null; } } if (isset($list) && $list) { $currentNama = $list->nama ?? null; } $existingBagians = DB::table('view_mst_bagian')->select('id', 'nama')->where('isactive', '1')->get(); @endphp