Theres two properties on the model you need to set. The first $primaryKey
to tell the model what column to expect the primary key on. The second $incrementing
so it knows the primary key isn't a linear auto incrementing value.
class MyModel extends Model
{
protected $primaryKey = 'my_column';
public $incrementing = false;
}
For more info see the Primary Keys
section in the documentation on Eloquent.