Laravel Eloquent no primary key
问题 I would like to update an old table that have a composite primary key. In order to generate a full update query such as: UPDATE foos SET (...) WHERE pk1 = ? AND pk2 = ?; Instead Eloquent tries to do the following which does massive update: UPDATE foos SET (...) WHERE pk1 = ?; I set the primary key attribute to null as seen on Google: class Foo extends Model { protected $guarded = []; protected $primaryKey = null; public $incrementing = false; public $timestamps = false; } But I get this error