fix: warning pedia que tenga el doc definido

This commit is contained in:
2025-03-26 17:48:32 -03:00
parent 173f87cf86
commit 9698bd1686
2 changed files with 7 additions and 2 deletions

View File

@@ -9,7 +9,9 @@ class Song extends Model
{
//
protected $fillable = ["title", 'artist', 'cover', 'user_id'];
/**
* @return BelongsTo<User,Song>
*/
public function user():BelongsTo
{
return $this->belongsTo(User::class);

View File

@@ -4,6 +4,7 @@ namespace App\Models;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
@@ -45,7 +46,9 @@ class User extends Authenticatable
'password' => 'hashed',
];
}
/**
* @return HasMany<Song,User>
*/
public function songs(): HasMany
{
return $this->hasMany(Song::class);