selected(); $carbonMonth = Carbon::create($yearPeriod->year, $month->toCarbonNumber()); $users = User::query() ->orderBy("last_name") ->orderBy("first_name") ->get(); $calendar = $calendarGenerator->generate($carbonMonth); return inertia("Calendar", [ "calendar" => $calendar, "currentMonth" => $month->value, "users" => UserResource::collection($users), "can" => [ "generateTimesheet" => $request->user()->can("generateTimesheet"), ], ]); } }