user
parent
9e5973fa96
commit
36c9f30764
|
|
@ -8,6 +8,7 @@ use Peidikeji\User\Filters\UserFilter;
|
|||
use Dcat\Admin\Traits\HasDateTimeFormatter;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Support\Str;
|
||||
use Peidikeji\Order\Models\Order;
|
||||
|
||||
class User extends Authenticatable
|
||||
{
|
||||
|
|
@ -74,4 +75,9 @@ class User extends Authenticatable
|
|||
// 18223350967 => 182****0967
|
||||
return $this->phone ? substr_replace($this->phone, '****', 3, 4) : '';
|
||||
}
|
||||
|
||||
public function orders()
|
||||
{
|
||||
return $this->hasMany(Order::class, 'user_id');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue