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.
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2EqQr6Y
via IFTTT
Aucun commentaire:
Enregistrer un commentaire