Skip to content

Commit

Permalink
chore: add default value or new value for document number
Browse files Browse the repository at this point in the history
  • Loading branch information
glenmoreilagan committed Nov 11, 2024
1 parent d35b0f1 commit fc46831
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Models/DocumentNumber.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ protected static function boot()

static::creating(function ($model) {
$model->uuid = (string) Str::uuid();
$model->document_no = (string) Str::ulid();
$model->document_no = $model->document_no ?? (string) Str::ulid();
});
}

Expand Down

0 comments on commit fc46831

Please sign in to comment.