Skip to content

How To Pass a Parameter in URL #2

Closed
@zmoddynamics

Description

@zmoddynamics

Hi,
I'm using your controller to invoke a shell command like this:

use \yii2sshconsole\Controller; class SshController extends Controller { public function actionExample($q=null) { echo $q; } }
Then, calling the url : example.com/ssh/example/1
gives the following error:
Unknown option: --q

I've also tried calling the url: example.com/ssh/example?q=1
gives the following error:
Unknown option: --q

Can I not pass a parameter in the URL because your class extends console/Controller and not yii\base\Controller ?

Is there a solution ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions