initial commit
This commit is contained in:
17
app/Models/Song.php
Normal file
17
app/Models/Song.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class Song extends Model
|
||||
{
|
||||
//
|
||||
protected $fillable = ["title", 'artist', 'cover', 'user_id'];
|
||||
|
||||
public function user():BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user