mirror of
https://github.com/koel/koel
synced 2024-12-24 11:33:05 +00:00
22 lines
562 B
PHP
22 lines
562 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\API;
|
|
|
|
use App\Http\Requests\API\YouTubeSearchRequest;
|
|
use App\Models\Song;
|
|
use App\Services\YouTubeService;
|
|
|
|
class YouTubeController extends Controller
|
|
{
|
|
private $youTubeService;
|
|
|
|
public function __construct(YouTubeService $youTubeService)
|
|
{
|
|
$this->youTubeService = $youTubeService;
|
|
}
|
|
|
|
public function searchVideosRelatedToSong(YouTubeSearchRequest $request, Song $song)
|
|
{
|
|
return response()->json($this->youTubeService->searchVideosRelatedToSong($song, $request->pageToken));
|
|
}
|
|
}
|