{"record":{"id":"9816b4b86d43804b","repo":"krayin/laravel-crm","slug":"the-index-key-is-required-ensure-that-the-inde","errorCode":null,"errorMessage":"The `index` key is required. Ensure that the `index` key is present in all calls to the `addColumn` method.","messagePattern":"The `index` key is required\\. Ensure that the `index` key is present in all calls to the `addColumn` method\\.","errorType":"exception","errorClass":"InvalidColumnException","httpStatus":null,"severity":"error","filePath":"packages/Webkul/DataGrid/src/Column.php","lineNumber":351,"sourceCode":"            'label' => $this->label,\n            'type' => $this->type,\n            'searchable' => $this->searchable,\n            'filterable' => $this->filterable,\n            'filterable_type' => $this->filterableType,\n            'filterable_options' => $this->filterableOptions,\n            'allow_multiple_values' => $this->allowMultipleValues,\n            'sortable' => $this->sortable,\n            'visibility' => $this->visibility,\n        ];\n    }\n\n    /**\n     * Validate the column.\n     */\n    public static function validate(array $column): void\n    {\n        if (empty($column['index'])) {\n            throw new InvalidColumnException('The `index` key is required. Ensure that the `index` key is present in all calls to the `addColumn` method.');\n        }\n\n        if (empty($column['label'])) {\n            throw new InvalidColumnException('The `label` key is required. Ensure that the `label` key is present in all calls to the `addColumn` method.');\n        }\n\n        if (empty($column['type'])) {\n            throw new InvalidColumnException('The `type` key is required. Ensure that the `type` key is present in all calls to the `addColumn` method.');\n        }\n    }\n\n    /**\n     * Resolve the column type class.\n     */\n    public static function resolveType(array $column): self\n    {\n        self::validate($column);\n","sourceCodeStart":333,"sourceCodeEnd":369,"githubUrl":"https://github.com/krayin/laravel-crm/blob/13d6988cda8d69ece45ee1890effc90a7f21cdc1/packages/Webkul/DataGrid/src/Column.php#L333-L369","documentation":"Error \"The `index` key is required. Ensure that the `index` key is present in all calls to the `addColumn` method.\" thrown in krayin/laravel-crm.","triggerScenarios":"Thrown at packages/Webkul/DataGrid/src/Column.php:351 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"13d6988cda8d69ece45ee1890effc90a7f21cdc1","analyzedAt":"2026-08-17T00:58:29.000Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}