Reputation: 341
I'm using Laravel 5 and Oracle XE 11 with yajra/laravel-oci8 plugin. When I try to delete or edit a record with Eloquent it's not working.
My table:
Model object to delete:
id_contact in last query is null instead binding with id in find()
Any ideas?
Upvotes: 2
Views: 3010
Reputation: 152880
For some reason the db adapter converts the uppercase column names into lowercase causing the attributes in your model to be all lowercase. Therefore you should access them in lowercase and also specify the primary key in lowercase:
protected $primaryKey = 'id_contact';
Upvotes: 5