From 9698bd16861403f590b374010d2a6f866eeead6f Mon Sep 17 00:00:00 2001 From: fede Date: Wed, 26 Mar 2025 17:48:32 -0300 Subject: [PATCH] fix: warning pedia que tenga el doc definido --- app/Models/Song.php | 4 +++- app/Models/User.php | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Models/Song.php b/app/Models/Song.php index a787ae6..c01b9fd 100644 --- a/app/Models/Song.php +++ b/app/Models/Song.php @@ -9,7 +9,9 @@ class Song extends Model { // protected $fillable = ["title", 'artist', 'cover', 'user_id']; - + /** + * @return BelongsTo + */ public function user():BelongsTo { return $this->belongsTo(User::class); diff --git a/app/Models/User.php b/app/Models/User.php index 11b17dd..22bb5e3 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -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 + */ public function songs(): HasMany { return $this->hasMany(Song::class);