I was doing a simple crud with ci4 and everything went very well until I noticed that to eliminate some element of a table from the forced field table the primary_key has to be called "id"
This is the function that I use to eliminate
elimination of public functions ($ key) {
$ this-> crud_model-> delete ($ key);
return redirect () -> to ("/ crud");
}
When I see the error between a system / Model.php and I see that there is a global variable called primaryKey with "id" as the default value.
My question is, what should I do to be able to use that function without my primary key field being called "id"?
Excuse me for my english, greetings from Cuba