koel/app/Http/Controllers/API/YouTubeController.php

21 lines
528 B
PHP
Raw Normal View History

2016-07-14 08:47:50 +00:00
<?php
namespace App\Http\Controllers\API;
2022-07-29 06:47:10 +00:00
use App\Http\Controllers\Controller;
use App\Http\Requests\API\YouTubeSearchRequest;
2016-07-14 08:47:50 +00:00
use App\Models\Song;
use App\Services\YouTubeService;
2016-07-14 08:47:50 +00:00
class YouTubeController extends Controller
{
2022-07-29 06:47:10 +00:00
public function __construct(private YouTubeService $youTubeService)
{
}
public function searchVideosRelatedToSong(YouTubeSearchRequest $request, Song $song)
2016-07-14 08:47:50 +00:00
{
return response()->json($this->youTubeService->searchVideosRelatedToSong($song, $request->pageToken));
2016-07-14 08:47:50 +00:00
}
}