Use PHPStorm to develop Laravel

Source: Internet
Author: User
Tags laravel tutorial
PHPstorm is already an IDE for the artifact sector. However, when developing with laravel, alise class names always have a wave of lines. There is a phpstorm plug-in, but it seems that only the badle template is supported.

PHPstorm is already an IDE for the artifact sector. However, when developing with laravel, alise class names always have a wave of lines. There is a phpstorm plug-in, but it seems that only the badle template is supported.

Many PHP programmers use Laravel to create their applications. Laravel is a free and open-source PHP web application framework. Based on Multiple Symfony components, it 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 and is artist-friendly. This Laravel programmer's command line tool can work in PhpStorm. with the Laravel plug-in and Laravel IDE help, we can further extend PhpStorm's support for Laravel applications. Let's see how it works!

Laravel IDE Assistant

First, make sure that Composer is available in our Project. We can use the Composer | Add dependency... Right-click the menu and Install Laravel IDE helper to our project. Search for barryvdh/laravel-ide-helper, and click Install to download and add it to the project.
When you register 'barryvdh \ LaravelIdeHelper \ idehelperserviceprovider' to serve our applications and run artisan ide-helper: generate, PhpStorm will have Code Completion functions and Laravel syntax highlighting.

Laravel plug-in PhpStorm

To further improve the Laravel experience, we can also install the Laravel plugin. In Settings (Preferences) | Plugins, Click Browse repositories... Click and search for Laravel. Install plugin to download and Install the plug-in to the IDE.

Restart the IDE and Enable the plug-in (Settings (Preferences) | Other Settings | Laravel Plugin | Enable Plugin for this Project ). phpStorm knows what the Laravel interface does and provides Code Completion functions (controllers, views, routes, configuration, translations, and so on!

Of course, it's not just code automation. use Ctrl + Click (CMD + Click Mac OS x) or Go To Declaration (To definition) (Ctrl + B/CMD + B ), phpStorm will navigate to it, such as the declaration of configuration items.

The Laravel plug-in can also improve the user experience by using the Blade template. For example, the @ section command automatically completes the car change.
Want to know more? View our Laravel tutorial. It contains all the things PhpStorm has prepared for Laravel development, including code autocompletion, navigation, automatic code check, command line tool support, debugging, and unit testing!

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

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

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.