I am using Youtube package
I added this on app.php
Alaouy\Youtube\YoutubeServiceProvider::class,
&
'Youtube' => Alaouy\Youtube\Facades\Youtube::class,
now i m trying in view like this
{{ Youtube::getVideoInfo('rie-hPVJ7Sw') }}
but getting error
"htmlspecialchars() expects parameter 1 to be string, object given
(View: C:\xampp\htdocs\guru\resources\views\admin\video\index.blade.php)"
how can I fix this?
i Tried
@foreach($videos as $video)
{{ var_dump(Youtube::getVideoInfo($video->videoid)) }}
@endforeach
As per the docs,
so you could do,
to print out the object or assign it to a variable and access the respective object properties
EDIT
To show only the embed html you could use the following code