PHP Class App\Http\Controllers\API\PlaylistController

Inheritance: extends Controller
Show file Open project: phanan/koel

Public Methods

Method Description
destroy ( Playlist $playlist ) : Illuminate\Http\JsonResponse Delete a playlist.
index ( ) : Illuminate\Http\JsonResponse Gets all playlists by the current user.
store ( PlaylistStoreRequest $request ) : Illuminate\Http\JsonResponse Create a new playlist.
sync ( Illuminate\Http\Request $request, Playlist $playlist ) : Illuminate\Http\JsonResponse Sync a playlist with songs.
update ( Illuminate\Http\Request $request, Playlist $playlist ) : Illuminate\Http\JsonResponse Rename a playlist.

Method Details

destroy() public method

Delete a playlist.
public destroy ( Playlist $playlist ) : Illuminate\Http\JsonResponse
$playlist app\models\Playlist
return Illuminate\Http\JsonResponse

index() public method

Gets all playlists by the current user.
public index ( ) : Illuminate\Http\JsonResponse
return Illuminate\Http\JsonResponse

store() public method

Create a new playlist.
public store ( PlaylistStoreRequest $request ) : Illuminate\Http\JsonResponse
$request App\Http\Requests\API\PlaylistStoreRequest
return Illuminate\Http\JsonResponse

sync() public method

Any songs that are not populated here will be removed from the playlist.
public sync ( Illuminate\Http\Request $request, Playlist $playlist ) : Illuminate\Http\JsonResponse
$request Illuminate\Http\Request
$playlist app\models\Playlist
return Illuminate\Http\JsonResponse

update() public method

Rename a playlist.
public update ( Illuminate\Http\Request $request, Playlist $playlist ) : Illuminate\Http\JsonResponse
$request Illuminate\Http\Request
$playlist app\models\Playlist
return Illuminate\Http\JsonResponse