public function indexSSR(OrderDataTableSearch $request): JsonResponse 	{ 		$orders = Order::includes();  		$status = $request->status ?? []; 		$search = $request->search['value'] ?? null;  		return DataTables::eloquent($orders) 		->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(); 			} 		}) 		->filter(static function ($query) use ($status, $search): void { 			if ($status !== []) { 				$query->filterStatuses($status); 			}  			if ($search) { 				$query->search($search); 			} 		}) 		->addColumn('author', static fn (Order $row): string => $row->getAuthorName()) 		->addColumn('items', static fn (Order $row) => $row->orderItems->count()) 		->addColumn('type', static fn (Order $row) => $row->approved_by_buyer ? __('orders.order') : __('orders.inquiery')) 		->addColumn('buyer', static fn (Order $row): string => $row->getBuyerName()) 		->addColumn('status', static fn (Order $row): string => $row->getLastStatusName()) 		->addColumn('edit', static fn (Order $row): View => view('layouts.edit_button', ['path' => ['orders.edit' => $row->getKey()]])) 		->addColumn('created_at', static fn (Order $row): string => '<td data-order="' . formatTimestamp($row->created_at, 'U') . '">' . formatLocalTimestamp($row->created_at) . '</td>') 		->addColumn('checkbox', static fn (Order $row): View => view('layouts.option_buttons', ['value' => $row->getKey()])) 		->rawColumns([ 			'edit', 			'created_at', 			'checkbox', 		]) 		->toJson(); 	}