Add Auth System (Breeze)

This commit is contained in:
2026-01-07 16:04:23 +01:00
parent e972f8db41
commit 256af435ad
44 changed files with 1314 additions and 203 deletions

View File

@@ -2,6 +2,7 @@
namespace App\Models;
//use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
@@ -63,6 +64,23 @@ class User extends Authenticatable
'discord_avatar' => 'string',
];
/**
* Get the user name
*/
public function getUserName(): string
{
if (!$this->discord_name) {
return $this->name;
}
if ($this->discord_name == $this->name)
{
return $this->name;
}
return "{$this->name} ({$this->discord_name})";
}
/**
* Has Many Playlists.
*/