简体   繁体   中英

Why are my custom laravel artisan commands not available in production environment

I have just installed a laravel app on the "to-be" production server (1and1 shared linux server).

With the same codebase as on my development server (Ubuntu 14.04 lts) my custom artisan commands are not available (php5.5 artisan list) on the production server.

I have done composer dump-autoload already. I have also checked the app/start/artisan.php file and that is OK and is executed. I have checked the app/config/production/app.php for the service providers and they seem to be all right.

I have also spent the better part of the day here on stackoverflow to find a solution, but without much success.

My Laravel version is: 4.1.28

Thanks so much for any help.

If you are getting no errors, you probably don't have the same codebase in production because, if resolve commands in your artisan.php file:

Artisan::resolve('CommandName');

And Laravel doesn't have access to this class, it will raise an exception:

"ReflectionException","message":"Class CommandName does not exist"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM