Home > PHP Framework > Laravel > How to quickly install the IDE prompt tool of the laravel framework

How to quickly install the IDE prompt tool of the laravel framework

藏色散人
Release: 2021-03-10 08:57:14
forward
2939 people have browsed it

The following tutorial column will introduce you to the IDE prompt tool for quickly installing the laravel framework. I hope it will be helpful to friends who need it!

Quickly install IDE prompt tool for laravel framework

Use this package with composer using the following command:

composer require –dev barryvdh/laravel-ide-helper
Copy after login

After updating composer, add the service provider to config/app.php
Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class
Copy after login
  • In Laravel, instead of adding the service provider in the configuration/application.php file, you can add the following code Go to the application/providers/AppServiceProvider.php file, in the register() method:
    public function register(){if ($this->app->environment() !== 'production') {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);}}
    Copy after login
  • You can configure composer.json to do this after every commit:
    "scripts":{"post-update-cmd": [
        "Illuminate\Foundation\ComposerScripts::postUpdate",        "@php artisan ide-helper:generate",        "@php artisan ide-helper:meta"]},
    Copy after login
  • You can also publish configuration files to change the implementation (i.e. the interface of a specific class) or set the default values ​​for -helpers or -sublime.
    php artisan vendor:publish –provider="Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider" –tag=config
    Copy after login
  • Now you can regenerate the documentation yourself (for future updates)
    php artisan ide-helper:generate
    Copy after login
Recommended:
The latest five Laravel videos Tutorial

The above is the detailed content of How to quickly install the IDE prompt tool of the laravel framework. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Composer cannot install laravel
From 1970-01-01 08:00:00
0
0
0
Laravel Space/laravel-backup cannot be installed
From 1970-01-01 08:00:00
0
0
0
Laravel 5.1 Login laravel comes with it No more
From 1970-01-01 08:00:00
0
0
0
Why thinkphp has better performance than laravel?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template