一文講解phpstorm如何安裝ide-helper(基於lumen)

藏色散人
發布: 2021-08-12 14:02:16
轉載
2723 人瀏覽過

下面由phpstorm教學專欄為大家介紹phpstorm 基於lumen如何安裝ide-helper,希望對需要的朋友有幫助!

一文講解phpstorm如何安裝ide-helper(基於lumen)

為了提高開發效率,也方便在model 中產生更多的屬性與方法,嘗試下ide-helper

安裝

composer require barryvdh/laravel-ide-helper

Using version ^2.6 for barryvdh/laravel-ide-helper
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 11 installs, 0 updates, 0 removals
  - Installing composer/xdebug-handler (1.3.2): Loading from cache
  - Installing composer/spdx-licenses (1.5.1): Loading from cache
  - Installing symfony/filesystem (v4.2.5): Loading from cache
  - Installing justinrainbow/json-schema (5.2.8): Loading from cache
  - Installing seld/phar-utils (1.0.1): Loading from cache
  - Installing seld/jsonlint (1.7.1): Loading from cache
  - Installing composer/semver (1.5.0): Loading from cache
  - Installing composer/ca-bundle (1.1.4): Loading from cache
  - Installing composer/composer (1.8.4): Loading from cache
  - Installing barryvdh/reflection-docblock (v2.0.6): Loading from cache
  - Installing barryvdh/laravel-ide-helper (v2.6.2): Loading from cache
barryvdh/reflection-docblock suggests installing dflydev/markdown (~1.0)
barryvdh/laravel-ide-helper suggests installing doctrine/dbal (Load information from the database about models for phpdocs (~2.3))
Writing lock file
Generating optimized autoload files
登入後複製

設定中載入(bootstrap/app.php)

 //ide helper
 $app->register(Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
登入後複製

自動產生

php artisan ide-helper:generate
登入後複製

報錯

一文講解phpstorm如何安裝ide-helper(基於lumen)

google 了下,應該是未安裝這個擴展,安裝

composer require league/flysystem
登入後複製

再執行,搞定

php artisan ide-helper:generate
A new helper file was written to _ide_helper.php
登入後複製

最好把產生的這些檔案都放到git 忽略檔案裡

_ide_helper.php
_ide_helper_models.php
.phpstorm.meta.php
登入後複製

參考:
https://laravelacademy.org/post/4202.html

# https://github.com/barryvdh/laravel-ide-helper/issues/723

以上是一文講解phpstorm如何安裝ide-helper(基於lumen)的詳細內容。更多資訊請關注PHP中文網其他相關文章!

相關標籤:
來源:segmentfault.com
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
最新問題
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!