public function index(DataTableSearch $request): JsonResponse 	{ 		$customers = Customer::with('authParent') 			->join('users', 'customers.id', '=', 'users.user_id') 			->leftJoin('roles', 'roles.id', '=', 'users.role_id') 			->select('customers.id', 'customers.created_at', 'users.allow_push_notifications', 'users.active', 'users.email_verified_at', 'roles.name');  		return DataTables::eloquent($customers) 			->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('name', static fn (Customer $row) => $row->authParent->name) 			->addColumn('edit', static fn (Customer $row): View => view('layouts.edit_button', ['path' => ['customers.edit' => $row->getKey()]])) 			->addColumn('created_at', static fn (Customer $row): string => '<td data-order="' . formatTimestamp($row->created_at, 'U') . '">' . formatLocalTimestamp($row->created_at) . '</td>') 			->addColumn('checkbox', static fn (Customer $row): View => view('layouts.option_buttons', ['value' => $row->getKey()])) 			->addColumn('allow_push_notifications', static fn (Customer $row): View => view('layouts.bool_badge', ['value' => $row->authParent->allow_push_notifications])) 			->addColumn('verified', static fn (Customer $row): View => view('layouts.bool_badge', ['value' => $row->authParent->hasVerifiedEmail()])) 			->addColumn('active', static fn (Customer $row): View => view('layouts.bool_badge', ['value' => $row->authParent->active])) 			->addColumn('email', static fn (Customer $row): string => '<a href="mailto:' . $row->authParent->email . '">' . $row->authParent->email . '</a>') 			->addColumn('role', static fn (Customer $row): string => '<a href="' . ($row->authParent->role_id ? route('roles.edit', $row->authParent->role_id) : '#') . '">' . ($row->authParent->role_id ? $row->authParent->role->name : '-') . '</a>') 			->rawColumns([ 				'edit', 				'name', 				'email', 				'role', 				'allow_push_notifications', 				'verified', 				'active', 				'created_at', 				'checkbox', 			]) 			->toJson(); 	}