rendra
rendra

Reputation: 341

Laravel , Eloquent delete not working

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:

My table

Model object to delete:

enter image description here

id_contact in last query is null instead binding with id in find()

enter image description here

Any ideas?

Upvotes: 2

Views: 3010

Answers (1)

lukasgeiter
lukasgeiter

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

Related Questions