0
私はコントローラでカスタムアーティザンコマンドを実行しようとしていますが、例外はCommandNotFound
例外をスローします。実装では、コマンド 'php artisan scan {url}'を実行する代わりに、コマンドを実行します。この回答のために、{url}スキャンを実行します。Running Artisan Command私は何を間違えたのか分かりません。コントローラでカスタムアーティザンコマンドを呼び出す| Laravel
カスタム職人コマンド署名
protected $signature = 'scan {url}
{--r= : y or n | to follow or not to follow the robot.txt}
{--fm= : set follow mode}
{--u= : username}
{--p= : password}
{--s : SQL module}
{--x : XSS module}';
実装
switch ($select) {
case 'full':
\Artisan::call('scan ' . $customer->cms_url); //url == http://localhost:8888
return $request;
break;
}
エラー
1/1) CommandNotFoundException
There are no commands defined in the "scan http" namespace.
in Application.php (line 548)
at Application->findNamespace('scan http')
in Application.php (line 582)
at Application->find('scan http://localhost:8888')
in Application.php (line 205)
のようなあなたのコマンドを呼び出すことができます。これは正しい解決策です。 – melkawakibi