gfazioli's avatar

$this->choice

Hi, in php artisan command the

$this->choice( "Hello", [ "one", "two"], 1 );

doesn't works, with error

[ERROR] Undefined index: one

I tried with string and integer but nothing...

Any ideas?

0 likes
2 replies
rodrigo.pedra's avatar

Can you provide more code? I just tested it and it works for me:

    public function handle()
    {
        $result = $this->choice( "Hello", [ "one", "two" ], 1 );
        $this->info( $result ); // outputs result
    }
1 like
johnf's avatar

Ok, fixed! I just update Laravel framework! Thanks

1 like

Please or to participate in this conversation.