mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-22 13:07:59 +01:00
Clean up loose code.
This commit is contained in:
parent
fb2997c2e9
commit
e7ed44d7de
1 changed files with 1 additions and 2 deletions
|
@ -30,7 +30,7 @@ class RemoveTrackFromPlaylistCommand extends CommandBase
|
||||||
private $_track;
|
private $_track;
|
||||||
private $_playlist;
|
private $_playlist;
|
||||||
|
|
||||||
function __construct($playlistId, $trackId)
|
public function __construct($playlistId, $trackId)
|
||||||
{
|
{
|
||||||
$this->_playlist = Playlist::find($playlistId);
|
$this->_playlist = Playlist::find($playlistId);
|
||||||
$this->_track = Track::find($trackId);
|
$this->_track = Track::find($trackId);
|
||||||
|
@ -52,7 +52,6 @@ class RemoveTrackFromPlaylistCommand extends CommandBase
|
||||||
*/
|
*/
|
||||||
public function execute()
|
public function execute()
|
||||||
{
|
{
|
||||||
// $songIndex = $this->_playlist->tracks()->count() - 1;
|
|
||||||
$this->_playlist->tracks()->detach($this->_track);
|
$this->_playlist->tracks()->detach($this->_track);
|
||||||
Playlist::whereId($this->_playlist->id)->update([
|
Playlist::whereId($this->_playlist->id)->update([
|
||||||
'track_count' => DB::raw('(SELECT COUNT(id) FROM playlist_track WHERE playlist_id = ' . $this->_playlist->id . ')')
|
'track_count' => DB::raw('(SELECT COUNT(id) FROM playlist_track WHERE playlist_id = ' . $this->_playlist->id . ')')
|
||||||
|
|
Loading…
Reference in a new issue