fix: warning pedia que tenga el doc definido
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user