app\models\Song::getRelatedYouTubeVideos PHP Method

getRelatedYouTubeVideos() public method

Get the YouTube videos related to this song.
public getRelatedYouTubeVideos ( string $youTubePageToken = '' ) : object | false
$youTubePageToken string The YouTube page token, for pagination purpose.
return object | false
    public function getRelatedYouTubeVideos($youTubePageToken = '')
    {
        return YouTube::searchVideosRelatedToSong($this, $youTubePageToken);
    }

Usage Example

コード例 #1
0
ファイル: SongController.php プロジェクト: phanan/koel
 /**
  * Get extra information about a song via Last.fm.
  *
  * @param Song $song
  *
  * @return \Illuminate\Http\JsonResponse
  */
 public function show(Song $song)
 {
     return response()->json(['lyrics' => $song->lyrics, 'album_info' => $song->album->getInfo(), 'artist_info' => $song->artist->getInfo(), 'youtube' => $song->getRelatedYouTubeVideos()]);
 }
All Usage Examples Of app\models\Song::getRelatedYouTubeVideos