App\Http\Controllers\API\PlaylistController::index PHP Method

index() public method

Gets all playlists by the current user.
public index ( ) : Illuminate\Http\JsonResponse
return Illuminate\Http\JsonResponse
    public function index()
    {
        return response()->json(Playlist::byCurrentUser()->orderBy('name')->with('songs')->get());
    }