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);