feat: update and dynamic profile for admin

This commit is contained in:
2026-08-19 17:05:05 +03:30
parent 279bcd3d9c
commit 2579a10e53
3 changed files with 82 additions and 14 deletions
+11 -2
View File
@@ -6,11 +6,20 @@ use Illuminate\Http\Request;
class ProfileController extends Controller
{
//
public function index()
{
$admin = auth('admin')->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'));
return view('dashboard.profile', compact('user', 'registerTime'));
}
}