This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
marzia
I use a build 419, this is a simple example for explain the problem. I have this class A:
class A extends Command
{
protected $name = 'projects:a';
public function fire()
{
$this->a();
}
public function a()
{
$this->info('Hello');
}
}
I would like to call from class B the method a():
class B extends Command
{
protected $name = 'projects:b';
public function fire()
{
$a = new A();
$a->a();
}
}
But when I run the command "php artisan projects:b" this is the console error:
[Symfony\Component\Debug\Exception\FatalThrowableError]
Call to a member function writeln() on null
Both commands are correctly registered in the plugin
Thanks for help.
Last updated
1-1 of 1