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

23 lines
562 B
PHP
Raw Normal View History

2016-07-14 08:47:50 +00:00
<?php
namespace App\Http\Controllers\API;
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
{
private $youTubeService;
public function __construct(YouTubeService $youTubeService)
{
$this->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
}
}