I've got an Laravel project, and when I added packages with composer, everything worked out fine. Now I've added JWTAuth, and the site breaks down. I get the following error:
production.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Class 'JWTAuth' not found' in /home/sensornetw/apps/app/Http/Controllers/API/AuthenticateController.php:21
It seems the autoloader won't load the class. I've removed the vendor dir, composer.json and installed everything from scratch.
The problem only occurs on the production server. On my local dev computer, there is no problem.
Well, shouldn't the autoloader do that? I use the correct namespace, if that is what you are asking. The local version confirms that, because there the class works without any problems.
@roeben and the package on the other server is installed through composer as well? Because of the code is fine, then you're dealing with other factors, which could be the missing package.
I removed the vendor directory a few times, reinstalled with composer. Ran all possible commands with composer, and checked everytime if the packages were downloaded.
If I check the vendor folder now on the server, the package is there, so why won't the autoader grab it?
Then given the circumstances i don't know what else to suggest. It's either something extremely contorted or extremely overlooked, because from the replies of all the peeps here, you say you tried the common solutions. :/