user(); if ($admin) { $registerTime = verta($admin->created_at)->format('Y/m/d'); return view('dashboard.profile', compact('admin', 'registerTime')); } $user = auth()->user(); $registerTime = verta($user->created_at)->format('Y/m/d'); return view('dashboard.profile', compact('user', 'registerTime')); } }