/** * Adds a track into the playlist. * * @param Track $track The track to add to the playlist. * @return void */ public function addTrack(Track $track) { $this->tracks->set($track->getId(), $track); }