Phpstorm laravel Code Smart Tips

Source: Internet
Author: User

Phpstorm&laravel

Phpstorm is the best PHP ide I have ever seen, the year before last without hesitation to abandon the Zend Studio:), Laravel is I used the best framework, in addition to do hand-travel backstage this kind of high concurrency requirements of the project will use Swoole, like Yii, Thinkphp,zend has been directly out of the project, but sadly the best IDE does not support the best Laravel code hints, and later I turned on GitHub and found the Laravel4-phpstorm-helper tool, but unfortunately, has not been updated for a long time, and later in the Foreign Forum found Laravel-ide-helper, used to now has been very force

Code Auto-Complete

Laravel-ide-helper installation and use is very convenient, change the Composer.json file as follows

  
 
  1. {
  2. // [snip]
  3. "require": {
  4. "laravel/framework": "4.1.*",
  5. "barryvdh/laravel-ide-helper": "dev-master"
  6. }
  7. // [snip]
  8. }

Project root directory run composer update command

 
   
  
  1. composer update

 
   
  
  1. ‘providers‘ => array(
  2. // [snip]
  3. ‘Illuminate\Workbench\WorkbenchServiceProvider‘,
  4. ‘Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider‘,
  5. ),

Run the following command in the project root directory

 
   
  
  1. php artisan ide-helper:generate

Now this command should generate a file called "_ide_helper.php", now Phpstorm has support code hints (such as), if not, you can restart the IDE to try

Phpstorm laravel Code Smart Tips

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.