用户配置转移
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user