That pull request makes possible to access Illuminate\Console\Command::$components protected property from asCommand method.
namespace App\Actions;
use Illuminate\Console\Command;
class ConsoleTestAction extends Action {
public string $commandSignature = 'test-action';
public function asCommand(Command $command): void {
$command->getComponents()->info('Done!');
}
}
Result:
I dont know if is the best choice.
Maybe the best way is to open a pull request on laravel repo.
see #205
That pull request makes possible to access Illuminate\Console\Command::$components protected property from asCommand method.
Result:
I dont know if is the best choice. Maybe the best way is to open a pull request on laravel repo.