Skip to content

Commit

Permalink
fix Command Generate (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
julianstark999 authored Feb 16, 2021
1 parent 1361d54 commit 242da22
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to `laravel-model-iid` will be documented in this file

## 0.0.5 - 2021-02-16
### modified
- Fixed issue in `iid:generate`

## 0.0.4 - 2021-01-18
### modified
- example from Category Post to Project Task
Expand Down
2 changes: 1 addition & 1 deletion src/Console/Generate.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function handle(): int
$modelClass->whereNull('iid')->cursor()->each(function ($row) use ($modelClass): void {
$latestModel = $row->where($modelClass->iidColumn, $row[$modelClass->iidColumn])
->whereNotNull('iid')
->orderBy('id', 'DESC')
->orderBy('iid', 'DESC')
->first();

$row->update([
Expand Down

0 comments on commit 242da22

Please sign in to comment.