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.