Exemplo n.º 1
0
 /**
  * remove song from playlist
  **/
 public function untag($parameter)
 {
     $song_id = $parameter[0];
     $playlist_id = $parameter[1];
     $model = new \Models\Playlist();
     $item = $model->find($id);
     $delete = $model->delete(array('playlist_album_id' => $playlist_id, 'playlist_song_id' => $song_id));
     if ($delete > 0) {
         Session::set('success', 'record deleted!');
     } else {
         Session::set('error', 'operation fails!');
     }
     Url::previous();
 }