zoukankan      html  css  js  c++  java
  • laravel安装laravel-ide-helper扩展进行代码提示(二)

    一、扩展的地址

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

      

    二、安装扩展

    1、引入库:

    composer require barryvdh/laravel-ide-helper
    composer require doctrine/dbal
    

    如果只想在开发环境上使用,请加上--dev

    composer require --dev barryvdh/laravel-ide-helper
    composer require --dev doctrine/dbal
    

    2、在config/app.php的 providers 数组中添加:

    BarryvdhLaravelIdeHelperIdeHelperServiceProvider::class
    

    3、运行命令,生成提示文档

    php artisan clear-compiled
    php artisan ide-helper:generate
    

    4、如果想每次提交时自动更新文档,可以配置composer.json

    "scripts":{
        "post-update-cmd": [
            "Illuminate\Foundation\ComposerScripts::postUpdate",
            "php artisan ide-helper:generate",
            "php artisan ide-helper:meta"
        ]
    },
    

    5、由于扩展会生成相应的文件,可能只针对当前开发者有用,所以需要添加到.gitignore中

    .idea
    _ide_helper.php
    _ide_helper_models.php
    .phpstorm.meta.php
    

      

  • 相关阅读:
    OC面向对象—继承
    OC面向对象—封装
    OC内存管理
    OC方法和文件编译
    OC语言基础知识
    节点操作-2
    留言 节点操作案例
    js 下拉菜单案例
    节点操作
    tab栏切换效果
  • 原文地址:https://www.cnblogs.com/jkko123/p/10677785.html
Copyright © 2011-2022 走看看