fix
This commit is contained in:
+2
-10
@@ -89,14 +89,6 @@ public function getUrlAttribute()
|
||||
|
||||
return $this->external_url;
|
||||
}
|
||||
|
||||
|
||||
public function getIsSavedAttribute()
|
||||
{
|
||||
if (!auth()->check()) return false;
|
||||
|
||||
return $this->savedBy()
|
||||
->where('user_id', auth()->id())
|
||||
->exists();
|
||||
}
|
||||
// is_saved / saved_count come from the HasSaves trait (saved_items table),
|
||||
// so the /saves/* endpoints and the media list/show all agree.
|
||||
}
|
||||
|
||||
@@ -9,9 +9,10 @@
|
||||
use App\Traits\HasComments; // Add this
|
||||
use App\Traits\HasLikes;
|
||||
use App\Traits\HasSaves;
|
||||
use App\Traits\HasRatings;
|
||||
class MusicPlaylist extends Model
|
||||
{
|
||||
use HasComments, HasLikes, HasSaves;
|
||||
use HasComments, HasLikes, HasSaves, HasRatings;
|
||||
protected $table = 'music_playlists';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
Reference in New Issue
Block a user