lundi 28 mars 2016

Laravel 5 update without id

I have a problem in Laravel 5. When I update a record in database, I get error Unknown column 'id' in 'where clause'. In the controller, I use WHERE clause to get the record I want to update. My primary key is not id and the type is bigInteger. I've tried adding protected $primaryKey in the model but it doesn't work for bigInteger. Is there any way to use my own primary key instead of using id?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1RBSgPf
via IFTTT

Aucun commentaire:

Enregistrer un commentaire