Home >PHP Framework >Laravel >How to install Laravel 5 IDE Helper

How to install Laravel 5 IDE Helper

藏色散人
藏色散人forward
2021-07-03 15:06:382097browse

How to install Laravel 5 IDE Helper

Laravel 5 IDE Helper Installation

1. Project Address

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

2. Installation method

1. Method 1: Directly use the generated file

Download https://gist.github.com _ide_helper.php in /barryvdh/5227822 is placed in the project root directory.

2. Method 2: Manually generate

Import library:

composer require barryvdh/laravel-ide-helper

Add in config/app.php providers:

Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,

Generate auxiliary files:

php artisan ide-helper:generate

Tips: You need to clear bootstrap/compiled.php first, so you need to execute php artisan clear-compiled before generation, and after generation Execute php artisan optimize.

Configure composer.json to execute after each commit.

"scripts":{
    "post-update-cmd": [
        "php artisan clear-compiled",
        "php artisan ide-helper:generate",
        "php artisan optimize"
    ]
},

Related recommendations: The latest five Laravel video tutorials

The above is the detailed content of How to install Laravel 5 IDE Helper. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:segmentfault.com. If there is any infringement, please contact admin@php.cn delete