krayin/laravel-crm · error · InvalidColumnException

The `index` key is required. Ensure that the `index` key is

Error message

The `index` key is required. Ensure that the `index` key is present in all calls to the `addColumn` method.

What it means

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.

Source

Thrown at packages/Webkul/DataGrid/src/Column.php:351

            'label' => $this->label,
            'type' => $this->type,
            'searchable' => $this->searchable,
            'filterable' => $this->filterable,
            'filterable_type' => $this->filterableType,
            'filterable_options' => $this->filterableOptions,
            'allow_multiple_values' => $this->allowMultipleValues,
            'sortable' => $this->sortable,
            'visibility' => $this->visibility,
        ];
    }

    /**
     * Validate the column.
     */
    public static function validate(array $column): void
    {
        if (empty($column['index'])) {
            throw new InvalidColumnException('The `index` key is required. Ensure that the `index` key is present in all calls to the `addColumn` method.');
        }

        if (empty($column['label'])) {
            throw new InvalidColumnException('The `label` key is required. Ensure that the `label` key is present in all calls to the `addColumn` method.');
        }

        if (empty($column['type'])) {
            throw new InvalidColumnException('The `type` key is required. Ensure that the `type` key is present in all calls to the `addColumn` method.');
        }
    }

    /**
     * Resolve the column type class.
     */
    public static function resolveType(array $column): self
    {
        self::validate($column);

View on GitHub (pinned to 13d6988cda)

When it happens

Trigger: Thrown at packages/Webkul/DataGrid/src/Column.php:351 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of krayin/laravel-crm@13d6988cda (2026-08-17). Data as JSON: /api/errors/9816b4b86d43804b. Report an issue: GitHub.