In order to work with a database table, you need to tell CrudKit what columns in the database you’d like to work with.
NOT NULLconstraint. This is required while creating rows on the table.
You can use
addColumnWithId to add a column. Both functions do the same thing but with one important distinction:
addColumnWithId will allow you to refer to a column by a unique ID. This is helpful when you don’t want to expose the column name to the client side. You might choose to do this for security considerations but it is not mandatory.
$sql_page->addColumn ($column_name, $column_label, $options); // or $sql_page->addColumnWithId ($id, $column_name, $column_label, $options);
The parameters are:
id a unique ID for the column (if using
column_name the column name on your database table
column_label the human friendly label for your column to be used on forms
options an array of optional parameters.
The type of the column is automatically detected.
Currently, no optional parameters are supported.