fix: refactored the codebase

This commit is contained in:
2026-08-20 23:00:47 +02:00
parent 6f47ed0674
commit a77f74911d
64 changed files with 2864 additions and 1739 deletions
+7
View File
@@ -7,6 +7,7 @@ use Database\Factories\UserFactory;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Attributes\Hidden;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
@@ -66,4 +67,10 @@ class User extends Authenticatable implements PasskeyUser
{
return $this->hasMany(Room::class, 'owner_id');
}
/** @return BelongsToMany<Room, $this> */
public function favoriteRooms(): BelongsToMany
{
return $this->belongsToMany(Room::class, 'user_room_favorites')->withTimestamps();
}
}