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