koel/app/Http/Controllers/V6/API/YouTubeSearchController.php

17 lines
467 B
PHP
Raw Normal View History

2022-06-10 10:47:46 +00:00
<?php
namespace App\Http\Controllers\V6\API;
use App\Http\Controllers\API\Controller;
use App\Http\Controllers\V6\Requests\YouTubeSearchRequest;
use App\Models\Song;
use App\Services\YouTubeService;
class YouTubeSearchController extends Controller
{
public function __invoke(YouTubeSearchRequest $request, Song $song, YouTubeService $youTubeService)
{
return $youTubeService->searchVideosRelatedToSong($song, (string) $request->pageToken);
}
}