阶段更新

This commit is contained in:
2023-03-09 11:54:13 +08:00
parent e78454540f
commit 3cd75b1d6e
47 changed files with 4844 additions and 1646 deletions

View File

@@ -9,7 +9,7 @@ use Modules\User\Traits\BelongsToUser;
class IdentityMiddle extends Pivot
{
use BelongsToUser, MorphManyTimeline;
use BelongsToUser;
protected $table = 'user_identity';
protected $primaryKey = 'user_id';
@@ -21,11 +21,7 @@ class IdentityMiddle extends Pivot
{
parent::boot();
self::created(function ($identity) {
if ($identity->identity->order > 1) {
$identity->addTimeline();
}
});
}
public function identity(): BelongsTo