21-11-2025

This commit is contained in:
Kevin Adametz 2025-11-21 18:21:23 +01:00
parent fa2ebd457d
commit 07959c0ba2
113 changed files with 4730 additions and 898 deletions

View file

@ -10,6 +10,7 @@ use Illuminate\Support\Str;
use Laravel\Fortify\TwoFactorAuthenticatable;
use Laravel\Sanctum\HasApiTokens;
use Spatie\Permission\Traits\HasRoles;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class User extends Authenticatable
{
@ -22,9 +23,11 @@ class User extends Authenticatable
* @var list<string>
*/
protected $fillable = [
'partner_id',
'name',
'email',
'password',
'email_verified_at',
];
/**
@ -50,6 +53,10 @@ class User extends Authenticatable
];
}
public function partner(): BelongsTo
{
return $this->belongsTo(Partner::class);
}
/**
* Get the user's initials
*/
@ -57,7 +64,7 @@ class User extends Authenticatable
{
return Str::of($this->name)
->explode(' ')
->map(fn (string $name) => Str::of($name)->substr(0, 1))
->map(fn(string $name) => Str::of($name)->substr(0, 1))
->implode('');
}
}