public function indexSSR(DataTableSearch $request): JsonResponse 	{ 		$blogs = Blog::withCount('activities')->where('domain_id', auth()->user()->user->activeDomain?->getKey()); 		$token = auth()->user()->token();  		return DataTables::eloquent($blogs) 		->order(static function (object $query) use ($request): void { 			$order_array = $request->get('order') ?? []; 			$columns_array = $request->columns;  			if (filled($order_array)) { 				foreach (array_column($order_array, 'dir', 'column') as $column_index => $order_direction) { 					$query->orderBy($columns_array[$column_index]['name'], $order_direction); 				} 			} else { 				$query->latest(); 			} 		}) 		->addColumn('edit', static fn (Blog $row): View => view('layouts.edit_button', ['path' => ['blogs.edit' => $row->getKey()]])) 		->addColumn('title', static fn (Blog $row): string => $row->getDefaultTranslation('title')) 		->addColumn('activities_count', static function (Blog $row) use ($token): string { 			$activity_modal = json_encode([ 				'api' => route('api.domains.blogs.activities', [auth()->user()->user->activeDomain->domain, $row->getKey()]), 				'token' => $token, 				'title' => $row->getDefaultTranslation('title') . ' > ' . __('activities.activity'), 			], JSON_THROW_ON_ERROR);  			return '<a href="#" title="' . __('activities.activity') . '" data-modal-data=\'' . $activity_modal . '\' data-toggle="modal" data-target="#activity-modal" class="text-hover-primary"> 				<i class="fa fa-clock"></i> ' . $row->activities_count . ' 			</a>'; 		}) 		->addColumn('featured', static fn (Blog $row): View => view('layouts.bool_badge', ['value' => $row->featured])) 		->addColumn('published_at', static fn (Blog $row): string => '<td data-order="' . formatTimestamp($row->published_at, 'U') . '">' . formatLocalTimestamp($row->published_at) . '</td>') 		->addColumn('created_at', static fn (Blog $row): string => '<td data-order="' . formatTimestamp($row->created_at, 'U') . '">' . formatLocalTimestamp($row->created_at) . '</td>') 		->addColumn('checkbox', static fn (Blog $row): View => view('layouts.option_buttons', ['value' => $row->getKey()])) 		->rawColumns([ 			'edit', 			'title', 			'activities_count', 			'featured', 			'published_at', 			'created_at', 			'checkbox', 		]) 		->toJson(); 	}