Skip to content

Commit 1f0f61d

Browse files
committed
fix
1 parent 5f5b303 commit 1f0f61d

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

src/Observers/GroupObserver.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,12 @@
33
namespace Yuges\Groupable\Observers;
44

55
use Yuges\Groupable\Models\Group;
6-
use Yuges\Groupable\Config\Config;
76

87
class GroupObserver
98
{
109
public function creating(Group $group): void
1110
{
12-
if ($group->shouldSortWhenCreating()) {
13-
if (is_null($group->order)) {
14-
$group->setHighestOrderNumber();
15-
}
16-
}
11+
1712
}
1813

1914
public function saving(Group $group): void

src/Observers/GroupableObserver.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@ class GroupableObserver
88
{
99
public function creating(Groupable $groupable): void
1010
{
11-
if ($groupable->shouldSortWhenCreating()) {
12-
if (is_null($groupable->order)) {
13-
$groupable->setHighestOrderNumber();
14-
}
15-
}
11+
1612
}
1713

1814
public function saving(Groupable $groupable): void

0 commit comments

Comments
 (0)