How to add custom method in laravel library which is not removed when laravel version update or PHP version update, I am using Cloudinary library "https://github.com/jrm2k6/cloudder" , I need to add a custom function which is not included in the library.
public function uploadLargeVideo($source, $publicId = null, $uploadOptions = array(), $tags = array())
{
$options = array_merge($uploadOptions, ['resource_type' => 'video']);
return $this->upload_large($source, $publicId, $options, $tags);
}
You can create a new class extending the class provided by the library.
then use
App\Support\Cloudder
instead ofJD\Cloudder\Facades\Cloudder
in your controller.