Closed rk closed 11 years ago
Weird, I don't have this problem. I go through the source code, it seems the model already autoload in console/start.php
Autoloader::directories(array(
Bundle::path('console').'models'
));
Mark
Do you have some other library with name Console loaded, or aliased? Because the bundle is working just fine. The models folder is added to the autoloader, and Console model is being loaded properly.
That's a really good point, I do have another object that I use in my CLI tasks that will do things like terminal colors, etc. So this could be as simple as a naming conflict. I'll reopen if I find it isn't a naming conflict.
Maybe Laravel could have a "disambiguation" warning in case of multiple class files around the a single class name.
You probably do :) It is not reporting that Console class doesn't exist, it reports that attach() method is missing. That means that Console class is loaded, but it's not the correct one.
Well, the weird thing is that since you updated your bundle to autoload its class the system broke. Before this latest version it worked (because mine was autoloaded too). So I never thought twice about it.
Thanks for the tip. :)
Before this update there was no autoloading model, it was all clusterfucked into controller.
OSX 10.6.8 Apache 2.2.22 PHP 5.3.15
When I direct my browser to
/console
I receive the following exception:To work around this (for the time being), I just mapped the class by hand. So something is going on with Autoloading this class.