I'm trying to solve this error since yesterday. My primary key column name is 'departmentId'
Whenever I try to delete the record by the code:
$department = departments::find($departmentId);
$department->delete();
It gives me a "converstion to string" error. As soon as I changed the Primary key column name to "id", it is working properly.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire