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

下面由phpstorm教程欄目給大家介紹phpstorm 基于lumen如何安裝ide-helper,希望對(duì)需要的朋友有所幫助!

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

為了提高開發(fā)效率,也方便在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)

立即學(xué)習(xí)PHP免費(fèi)學(xué)習(xí)筆記(深入)”;

 //ide helper  $app->register(BarryvdhLaravelIdeHelperIdeHelperServiceProvider::class);

自動(dòng)生成

php artisan ide-helper:generate

報(bào)錯(cuò)

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

google 了下,應(yīng)該是未安裝這個(gè)擴(kuò)展,安裝

composer require league/flysystem

再執(zhí)行 ,搞定

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.htmlhttps://github.com/barryvdh/laravel-ide-helper/issues/723

以上就是一文講解

? 版權(quán)聲明
THE END
喜歡就支持一下吧
點(diǎn)贊11 分享