Home  >  Article  >  Backend Development  >  Using PHPStorm to develop Laravel_PHP tutorial

Using PHPStorm to develop Laravel_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:00:401150browse

Use PHPStorm to develop Laravel

Now PHPstorm is an IDE in the artifact field, but when developing with laravel, the class name of alise always has wavy lines. There is a phpstorm plug-in, but it seems to only support badle templates.

Many PHP programmers use Laravel to create their applications. Laravel is a free and open source PHP web application framework. It is based on multiple Symfony components and provides a development framework, including authentication, routing, sessions, caching and other modules.

Last summer, we introduced support for Blade . Blade is Laravel's template language, artist-friendly, and a command-line tool for Laravel programmers that can work in PhpStorm. Using Laravel plugins and Laravel IDE helpers, we can further extend PhpStorm's support for Laravel applications. Let’s see how to do it!

Laravel IDE Assistant

First confirm that Composer is available in our Project, we can use the Composer | Add dependency… right-click menu to install Laravel IDE helper to our project. Search barryvdh/laravel-ide-helper, and click Install to download and Add to project.
After registering the 'BarryvdhLaravelIdeHelperIdeHelperServiceProvider' service to our application and running artisan ide-helper:generate, PhpStorm will have code completion and Laravel syntax highlighting.

Laravel plugin in PhpStorm

To further enhance our Laravel experience, we can also install Laravel plug-ins. In Settings (Preferences) | Plugins, click the Browse repositories… button and search for Laravel. The Install plugin button will download and install the plug-in to the IDE.

Restart the IDE and enable the plugin (Settings (Preferences) | Other Settings | Laravel Plugin | Enable Plugin for this Project). PhpStorm knows what Laravel's interface does, and provides it (controllers, views, routes, configuration, translations, etc.) Code completion feature!

Of course it’s not just code completion, using Ctrl Click (CMD Click Mac OS X) or Go To Declaration (Ctrl B / CMD B), PhpStorm will navigate there, such as the declaration of a configuration item.

Regarding using Blade templates, Laravel plug-ins can also improve the experience, such as: automatic car completion modification of @section directive.
Want to know more? Check out our Laravel Tutorial, which covers everything PhpStorm has to offer for Laravel development, including code auto-completion, navigation, automatic code inspection, command line tool support, debugging and unit testing!

Are you a Laravel programmer? Try PhpStorm 8! We have a carefully prepared tutorial.

The above is the entire content of this article, I hope you all like it.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/973121.htmlTechArticleUsing PHPStorm to develop Laravel Now PHPstorm is already an IDE in the artifact field, but when developing with laravel, Alise's class name will always have a tilde. There is a phpstor...
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