public function indexSSR(DataTableSearch $request): JsonResponse 	{ 		$emblems = Emblem::withCount('activities'); 		$token = auth()->user()->token();  		return DataTables::eloquent($emblems) 		->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 (Emblem $row): View => view('layouts.edit_button', ['path' => ['emblems.edit' => $row->getKey()]])) 		->addColumn('title', static fn (Emblem $row): string => $row->title) 		->addColumn('activities_count', static function (Emblem $row) use ($token): string { 			$activity_modal = json_encode([ 				'api' => route('api.emblems.activities', $row->getKey()), 				'token' => $token, 				'title' => $row->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('active', static fn (Emblem $row): View => view('layouts.bool_badge', ['value' => $row->active])) 		->addColumn('created_at', static fn (Emblem $row): string => '<td data-order="' . formatTimestamp($row->created_at, 'U') . '">' . formatLocalTimestamp($row->created_at) . '</td>') 		->addColumn('checkbox', static fn (Emblem $row): View => view('layouts.option_buttons', ['value' => $row->getKey()])) 		->rawColumns([ 			'edit', 			'title', 			'activities_count', 			'active', 			'created_at', 			'checkbox', 		]) 		->toJson(); 	}