Files
core/src/Customer/Models/Customer.php
T

39 lines
835 B
PHP
Raw Normal View History

2026-07-01 18:35:39 +03:00
<?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}",
),
);
}
}