I am new to laravel and using ardent for creating models, I have below base class for all model.
class MainModel extends Ardent {
//with some common methods
}
and now i have sub model class such user
class User extends MainModel
{
//with user table and other methods related to user
}
and also I have repository for user ->User Repository and I am calling firstOrcreate method to check(user entry) and create user. if user is exists in database then above method is working fine ,its returning existing user object but if user is not exists in database it is not creating user also its not inserting entry to table.is I am doing wrong here?