Reputation: 571
This is a really strange thing I've found. I'm using Laravel's workbench on my Windows 7 system. Everything works perfectly, I have even pulled these packages onto other projects within my Windows environment and all is well.
The problem is when I have it installed on my CentOS server, it says can't find class ClassController@index. Now, here's the strange part, I can run composer dump-autoload -o and everything runs smooth until I update my package where I need to re-run composer dump-auoload -o.
Can anyone figure out what I need to change so it will always find my class? Or maybe this is a bug within Laravel?
I have my controllers listed in my autoload classmap within my composer.json.
I would appreciate any help on this.
Upvotes: 0
Views: 358
Reputation: 767
If you're referring to the Package Development workbench, you need to run the composer install
in the root folder of your package as well.
Also:
The -o
flag on dump-autoload command will convert all class loaders into class map. So if running that fixes your problem, I am guess the problem lies either with your PSR-0/4 autoloader or the class namespace.
Upvotes: 0