with(['headerLogo', 'footerLogo'])->latest()->paginateFromRequest())->response(); } public function store(StoreTenantRequest $request): JsonResponse { $tenant = $this->tenantService->create($request->validated()); return TenantResource::make($tenant->loadMissing(['headerLogo', 'footerLogo']))->response()->setStatusCode(201); } public function show(Tenant $tenant): TenantResource { return TenantResource::make($tenant->loadMissing(['headerLogo', 'footerLogo'])); } public function update(UpdateTenantRequest $request, Tenant $tenant): TenantResource { $tenant = $this->tenantService->update($tenant, $request->validated()); return TenantResource::make($tenant->loadMissing(['headerLogo', 'footerLogo'])); } public function destroy(Tenant $tenant): Response { $tenant->delete(); return response()->noContent(); } }