I know there's been numerous other posts like this, but none of them worked for me, and I'm at my rope's end - this is driving me nuts.
I'm using CloudConvert, which works perfectly on my local instance. When pushing up to my EC2 server, I'm just getting this error:
Class 'CloudConvert' not found in /var/www/html/api/app/Jobs/UploadFile.php:169
I've obviously tried composer dump-autoload
which does nothing, tried composer update
and composer install
which did even less. I've removed any record of it, re-installed with composer require
and then php artisan vendor:publish
. Also nothing. Gave php artisan optimize --force
but that's never really worked for anything.
I'm adding the service provider like so:
RobbieP\CloudConvertLaravel\CloudConvertLaravelServiceProvider::class,
...and the facade like so:
'CloudConvert' => RobbieP\CloudConvertLaravel\Facades\CloudConvert::class,
Once again, works perfectly locally. I'm sort of out of ideas.
Anyone got any insights I'm missing?
Have you tried to clear your config? php artisan config:clear
.
Sometimes it also helps to delete the cached files in bootstrap/cache/*.php
.
Okay, it's not a solution per se, but restarting my whole server seemed to fix it.
No idea at all why, but I guess it's got nothing to do with caches or anything...