I tried to clone everything again, but it gives me the same error.
Jun 23, 2016
6
Level 10
Problem with my package on my server
I have made a package, and it works fine on my Virtual Host Debian, but when I deploy it to my Digital Ocean, also Debian, it gives me an error:
Generating autoload files
> Illuminate\Foundation\ComposerScripts::postInstall
> php artisan optimize
[ReflectionException]
Class vendor\package\App\Console\Commands\Courses does not exist
Script php artisan optimize handling the post-install-cmd event returned with an error
[RuntimeException]
Error Output:
I register the commands like this, but as said, they work perfectly on my VM
public function register()
{
$this->mergeConfigFrom(
__DIR__ .'/config/package.php', 'package'
);
$this->commands([
\vendor\package\App\Console\Commands\Courses::class,
\vendor\package\App\Console\Commands\Programmes::class,
]);
}
The namespace for Courses is
namespace vendor\package\App\Console\Commands;
Level 10
I managed to fix them by change this
App\Console\Commands\Courses::class,
App\Console\Commands\Programmes::class,
Please or to participate in this conversation.