用户配置转移

This commit is contained in:
2022-11-01 16:39:45 +08:00
parent 719a9ff89d
commit 87e650b2f1
14 changed files with 461 additions and 33 deletions

View File

@@ -2,23 +2,11 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use App\Models\Traits\BelongsToUser;
class UserInfo extends Model
{
use BelongsToUser;
protected $primaryKey = 'user_id';
protected static function boot()
{
parent::boot();
self::created(function ($model) {
});
}
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
}