Can I change Eloquent model primary key.
I want to set primary key for example admin_id
instead of 'id'?
I know I can change table name for model like
protected $table = "admin";
Is there something similar for primary key?
Yes
class User extends Eloquent {
protected $primaryKey = 'admin_id';
}