feat: add like table

This commit is contained in:
2026-05-24 23:21:00 +03:30
parent d8f769e738
commit 5800f64f88
7 changed files with 399 additions and 3 deletions
+5 -2
View File
@@ -11,10 +11,11 @@
use App\Traits\HasRatings;
use App\Traits\HasComments;
use App\Traits\HasSaves;
use App\Traits\HasLikes;
class Music extends Model
{
use HasFactory, HasRatings, HasComments , HasSaves;
use HasFactory, HasRatings, HasComments , HasSaves,HasLikes;
protected $table = 'music';
@@ -54,7 +55,9 @@ public function tags(): BelongsToMany
'user_comment_id',
'has_user_rated' ,
'is_saved',
'saved_count'
'saved_count',
'is_liked',
'likes_count'
];
public function getUrlAttribute()