You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?phpuseWeDevs\ORM\Eloquent\Model;
/** * Class ClassBaseModel * * We need a Base Model, since by default model saves can trigger errors * without throwing anything. */class ClassBaseModel extends Model {
publicfunctionsave(array$options = []) {
$saved = parent::save($options);
$error = $this->getConnection()->db->last_error;
if ($error) {
thrownew \Exception($error);
}
return$saved;
}
}
Then you always create a new Model Class by extending the above.
hello,
save function always return true
var_dump($model->save());
you can fix it ?
The text was updated successfully, but these errors were encountered: