Laravel using Codex--using Phpstorm to boost development speed Phpstorm 9 registration code Phpstorm laravel plug-in Phpstorm laravel

Source: Internet
Author: User
Data-id= "1190000004980370" data-licence= "" >

Phpstorm Installation

Phpstorm Use Codex--Install look here

Code Auto Prompt Support

Laravel introduced to laravel-ide-helper provide support for Phpstorm

composer require barryvdh/laravel-ide-helper

Add the following code toconfig/app.php

Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,

Build related content:

php artisan ide-helper:generate

Then add the build to the composer.json configuration

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

Complete the above steps to be happy to use the code automatically prompt in Phpstorm, the rest of the configuration see Laravel-ide-helper

Using swagger to provide API documentation

Using swagger is a good way to provide a set of automatic document generation scheme, and effectively solve the communication problems such as front and rear work delivery.

Laravel install Swagger support and Swagger-ui please go to Laravel using Codex--swagger.

Installation support in Phpstorm

菜单栏File -> Setting -> Plugins -> Browse repositories搜索 PHP Annotations Plugin 和 Symfony2 Plugin 安装

Use can not fully refer to the Laravel plug-in zircote/swagger-php notes, using Phpstorm automatic completion of the content of the format can be, namely:

##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") * ) */

Swagger Summary

From the official swagger document, you can see that for phpstorm support optional PHP Annotations Plugin and Symfony2 Plugin , after testing, it has been found that it must be installed PHP Annotations Plugin to be able to use the memo completion function well.

The above describes the use of Laravel Codex-using Phpstorm to improve the speed of development, including the phpstorm,laravel aspects of the content, I hope to be interested in PHP tutorial friends helpful.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.