SettingsHelper = new SettingsHelper(); $this->UserHelper = new UserHelper(); $this->middleware('jwt.auth')->except('login'); } /** * Dashboard payload for API clients. * * The payload is built by the shared DashboardTrait::buildDashboardResponse() * - the same code path the web dashboard uses - so the API can never * return more (or other) data than the web interface shows to the same * user. The response keeps the standard API envelope. */ public function dashboardAjax() { $user = auth()->user(); if (!$user) { return $this->respond(false, [], [], 'User not authenticated', 401); } return $this->respond( true, $this->buildDashboardResponse(), [], 'Dashboard data retrieved successfully' ); } }