feat: add like and save for playlist

This commit is contained in:
2026-05-30 18:17:27 +03:30
parent 8923810df3
commit 230bfc2ad8
4 changed files with 26 additions and 12 deletions
+8 -2
View File
@@ -6,9 +6,11 @@
use Illuminate\Database\Eloquent\Relations\BelongsTo; // ← Add this
use Illuminate\Database\Eloquent\Relations\HasMany; // ← Add this
use App\Traits\HasComments; // Add this
use App\Traits\HasLikes;
use App\Traits\HasSaves;
class MusicPlaylist extends Model
{
use HasComments;
use HasComments, HasLikes, HasSaves;
protected $table = 'music_playlists';
protected $fillable = [
@@ -23,7 +25,11 @@ class MusicPlaylist extends Model
'comments_count',
'has_user_commented',
'user_comment',
'user_comment_id'
'user_comment_id',
'is_liked',
'likes_count',
'is_saved',
'saved_count'
];
public function category(): BelongsTo
{