Init
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Core\Customer\Models;
|
||||
|
||||
use Illuminate\Auth\Authenticatable;
|
||||
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
|
||||
use Illuminate\Foundation\Auth\Access\Authorizable;
|
||||
|
||||
class Customer extends \Lunar\Models\Customer implements AuthenticatableContract
|
||||
{
|
||||
use Authenticatable;
|
||||
use Authorizable;
|
||||
|
||||
protected $casts = [
|
||||
'otp_expires_at' => 'datetime',
|
||||
];
|
||||
|
||||
public function getTitleAttribute(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public function setTitleAttribute($value): void
|
||||
{
|
||||
// title is not used
|
||||
}
|
||||
|
||||
public function getFullNameAttribute(): string
|
||||
{
|
||||
return trim(
|
||||
preg_replace(
|
||||
"/\s+/",
|
||||
" ",
|
||||
"{$this->first_name} {$this->last_name}",
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user