Comments (15)
@joedawson Sorry .. it's my silly fault .. this is my code
$video = Videos::user()->findOrFail($id);
$video = Youtube::upload(public_path($video->video_file), [
'title' => $video->title,
'description' => $video->description . ' .. read more [ '.$video->url.' ]' ,
]);
$video->update(['youtube_id' => $video->getVideoId()]);
so the second line I overwrite $video
object from Videos to Youtube and call model $video->update method from $video Youtube Object.
now everything is working with version 2.0.0
from youtube.
No problem, thanks :)
from youtube.
I didn't see that, glad you solved the issue.
from youtube.
Hey @ahmedash95,
Before I get a chance to test this, are you up to date? v2.0.0 was released recently.
Also, what version of Laravel are you using?
Thanks
from youtube.
Oh .. I think my mistake is that I'm using laravel 5.3 and the latest release is for 5.4 I downgrade to 1.1.2.
from youtube.
Let me know how how get on, I'll add a note to the readme if it works on 1.1.2 for 5.3 :)
from youtube.
I will test it at night then tell you
from youtube.
@joedawson Hi Joe . unfortunately still have the same exception after downgrading .. but it uploads to youtube successfully
from youtube.
Awesome, thanks for confirming @ahmedash95 :)
from youtube.
Hi @ahmedash95,
I don't think there is an update
method in Youtube
instance.
If a method doesn't exists in the Youtube
instance, this one is called: https://github.com/JoeDawson/youtube/blob/master/src/Youtube.php#L310
Hi @joedawson:
To solve this, you need to add more checks in the __call
method:
/**
* Pass method calls to the Google Client.
*
* @param string $method
* @param array $args
*
* @return mixed
*/
public function __call($method, $args)
{
if (method_exists($this->client, $method))
return call_user_func_array([$this->client, $method], $args);
if (method_exists($this->youtube, $method))
return call_user_func_array([$this->youtube, $method], $args);
throw new \BadMethodCallException(
'The method called is not supported by this package: ['.$method.']'
);
}
from youtube.
@joedawson weclome .. and thanks for your interesting
from youtube.
Hi @arcanedev-maroc , thanks for clarifying .. what makes me confused is it tells me there is no update method at Google_Client class .. so i started debugging where is Google_Client class .. then I started review my code from first.
Thanks again
from youtube.
@ahmedash95, Do you have something like Youtube::update(...)
in your code ??
from youtube.
@arcanedev-maroc Here is my mistake #44 (comment)
from youtube.
@arcanedev-maroc he's already solved this, he used the $video
variable twice here - #44 (comment)
from youtube.
Related Issues (20)
- Can i use this package with Vuejs? HOT 1
- Is there a way to use user specific access token? HOT 1
- quotaExceeded - Exception returns error 500 HOT 4
- Undefined index: created HOT 1
- Re-authenticate HOT 1
- Playlist HOT 1
- 1MB chunk hardcoded should be moved to config HOT 1
- Upload with public parameter got blocked (private) on youtube HOT 1
- While uploading unlisted video it got uploaded as private HOT 2
- Not found exception HOT 27
- Add support to Laravel 8 HOT 1
- how can i make a playlist and push video to it ? HOT 1
- Add possibility to set embeddable status attribute
- How can I Share private youtube videos automatically? HOT 1
- Can't delete a youtube video
- call_user_func_array() expects parameter 1 to be a valid callback, class 'Google\Client' does not have a method 'getVideoInfo'
- PHP 8 and/or 8.1 support? HOT 2
- filesize(): stat failed error HOT 1
- Laravel 9 compatibility HOT 1
- Videos locked in private mode
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from youtube.