public function handle(Command $command) { $request = $command->getRequest(); $playlist = Playlist::create(uniqid(), $request->get('name')); $this->playlist_repository->add($playlist); return $playlist; }
public function handle(Command $command) { $request = $command->getRequest(); $playlist = $this->playlist_repository->get(new PlaylistIdentity($request->get('id'))); $this->updateName($playlist, $request->get('new_name')); $this->addTracks($playlist, $request->get('add_tracks')); $this->removeTracks($playlist, $request->get('remove_tracks')); $this->playlist_repository->add($playlist); return $playlist; }
public function handle(Command $command) { $request = $command->getRequest(); return $this->track_repository->getListByName($request->get('search_term')); }
public function handle(Command $command) { $request = $command->getRequest(); $playlist = $this->playlist_repository->get(new PlaylistIdentity($request->get('id'))); $this->playlist_repository->remove($playlist); }
public function handle(Command $command) { $request = $command->getRequest(); return $this->artist_repository->get(new ArtistIdentity($request->get('id'))); }