laravel-ide-helper 遇到There are no commands defined問題怎么解決


laravel門面類的代碼提示方案:

https://github.com/barryvdh/laravel-ide-helper

 

按照步驟安裝

1、composer require barryvdh/laravel-ide-helper

2、添加下面這行到config\app.PHP的providers數組項中

Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,

3、php artisan ide-helper:generate

這時候報錯

[Symfony\Component\Console\Exception\CommandNotFoundException]
There are no commands defined in the "ide-helper" namespace.

 

php artisan clear-compiled

php artisan optimize

都沒用

最后是運行

php artisan config:clear

 

再執行php artisan ide-helper:generate就成功了 如果執行php artisan ide-helper:generate 報遠程拒絕訪問 是因為你的mysql服務沒有開啟 開啟后 在執行這個命令即可


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM