feat: integrate login/registration into PurchaseWizard
This commit is contained in:
@@ -10,8 +10,8 @@ use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
use Laravel\Sanctum\HasApiTokens;
|
||||
|
||||
class User extends Authenticatable implements MustVerifyEmail
|
||||
use Filament\Models\Contracts\HasName;
|
||||
class User extends Authenticatable implements MustVerifyEmail, HasName
|
||||
{
|
||||
/** @use HasFactory<\Database\Factories\UserFactory> */
|
||||
use HasApiTokens, HasFactory, Notifiable;
|
||||
@@ -90,6 +90,14 @@ class User extends Authenticatable implements MustVerifyEmail
|
||||
);
|
||||
}
|
||||
|
||||
public function getFilamentName(): string
|
||||
{
|
||||
if ($this->first_name && $this->last_name) {
|
||||
return trim($this->first_name . ' ' . $this->last_name);
|
||||
}
|
||||
return $this->username ?? $this->email ?? 'Unnamed User';
|
||||
}
|
||||
|
||||
public function tenant(): HasOne
|
||||
{
|
||||
return $this->hasOne(Tenant::class);
|
||||
|
||||
Reference in New Issue
Block a user