krayin/laravel-crm · error · InvalidColumnException

The `type` key is required. Ensure that the `type` key is pr

Error message

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

What it means

Error "The `type` key is required. Ensure that the `type` key is present in all calls to the `addColumn` method." thrown in krayin/laravel-crm.

Source

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

            '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);

        $columnTypeClass = ColumnTypeEnum::getClassName($column['type']);

        return new $columnTypeClass($column);
    }
}

View on GitHub (pinned to 13d6988cda)

When it happens

Trigger: Thrown at packages/Webkul/DataGrid/src/Column.php:359 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/100876b697f69cb0. Report an issue: GitHub.