Open seoasia-co opened 1 year ago
I've tried all php artisan optimize:clear and composer dump-autoload
I looks like it tries to find VideoThumbnail class in your /app/Http/Controllers folder, did you used right namespace for VideoThumbnail Facade?
I follow your instruction and add in config.php 'providers' Pawlox\VideoThumbnail\VideoThumbnailServiceProvider::class, and alias 'VideoThumbnail' => Pawlox\VideoThumbnail\Facade\VideoThumbnail::class,
that 's it all I saw in your instruction.
Need I have to create controller? php artisan make:controller VideoThumbnail ?
but I saw the same problem in many forum and they run php artisan cache:clear then it work. but It's not for me.
Composer install:
composer require pawlox/video-thumbnail After package installation, add the ServiceProvider to the providers array in config/app.php
Pawlox\VideoThumbnail\VideoThumbnailServiceProvider::class And to the aliases array
'VideoThumbnail' => Pawlox\VideoThumbnail\Facade\VideoThumbnail::class Also you can publish package config file with:
php artisan vendor:publish --tag=video-thumbnail and set ffmpeg and ffprobe paths in .env file:
FFMPEG="/usr/bin/ffmpeg" FFPROBE="/usr/bin/ffprobe"
then I call this in the place I should call in other controller
VideoThumbnail::createThumbnail( public_path('files/movie.mp4'), public_path('files/thumbs/'), 'movie.jpg', 2, 1920, 1080 );
Try to add
use Pawlox\VideoThumbnail\Facade\VideoThumbnail;
at the top of the controller.
local.ERROR: Class "App\Http\Controllers\VideoThumbnail" not found {"userId":1,"exception":"[object] (Error(code: 0): Class \"App\Http\Controllers\VideoThumbnail\" not found at /app/Http/Controllers/MainController.php:316)