PHPStorm installation PHPStorm usage manual - installation, look at the code here to automatically prompt to support laravel and introduce laravel-ide-helper To provide corresponding support for PHPStorm composer require barryvdh/laravel-ide-helper add the following code to config/app.phpBarryvdhLa"/> PHPStorm installation PHPStorm usage manual - installation, look at the code here to automatically prompt to support laravel and introduce laravel-ide-helper To provide corresponding support for PHPStorm composer require barryvdh/laravel-ide-helper add the following code to config/app.phpBarryvdhLa">

Home >Backend Development >PHP Tutorial >Laravel usage manual - use PHPStorm to improve development speed phpstorm 9 registration code phpstorm laravel plug-in phpstorm laravel configuration

Laravel usage manual - use PHPStorm to improve development speed phpstorm 9 registration code phpstorm laravel plug-in phpstorm laravel configuration

WBOY
WBOYOriginal
2016-07-29 08:52:421788browse

data-id="1190000004980370" data-licence="">

PHPStorm installation

PHPStorm use manual - see here for installation

code automatic prompt support

laravel introductionlaravel-ide-helpercan provide corresponding support for PHPStorm

<code>composer require barryvdh/laravel-ide-helper</code>

Add the following code to config/app.php

<code>Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,</code>

Build related content:

<code>php artisan ide-helper:generate</code>

Then add the build to composer.jsonConfiguration

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

Complete the above steps and you can happily use the code in PHPStorm Automatically prompted, please see laravel-ide-helper for the rest of the configuration

Use Swagger to provide API documentation

Using Swagger can provide a set of automatic document generation solutions, and effectively solve communication problems such as front-end and back-end work delivery.

To install Swagger support and Swagger-ui in Laravel, please go to laravel usage guide - Swagger.

Installing and supporting

<code>菜单栏
File -> Setting -> Plugins -> Browse repositories

搜索 PHP Annotations Plugin 和 Symfony2 Plugin 安装</code>

in PHPStorm. When using it, you don’t need to completely refer to the laravel plug-in zircote/swagger-php. You can use PHPStorm to automatically complete the content format, that is:

<code>##Swagger-php建设的备注格式
/**
 * @SWG\Info(title="My First API", version="0.1")
 */

/**
 * @SWG\Get(
 *     path="/api/resource.json",
 *     @SWG\Response(resp/api/resource.json",
 *     @SWG\Response(resp description="An example resource")
 * )
 */</code>

Swagger summary

From Swagger The official documentation shows that PHPStorm supports the optional PHP Annotations Plugin and Symfony2 Plugin. After testing, it was found that the PHP Annotations Plugin must be installed to make good use of the note completion function.

The above introduces the laravel usage manual - using PHPStorm to improve development speed, including phpstorm and laravel content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
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