I believe there are many PHP programmers using [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. (Recommended learning: phpstorm detailed explanation)
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!
Install Laravel IDE Assistant
##Official way
First make sure Composer is in It is available in our project, we can use Composer | Add dependency… right-click menu to install [Laravel 5 IDE Helper Generator] to our project. Search barryvdh/laravel-ide-helper, and click Install to download and add to the project.Self-service method
Because we are using it in the project, we add this function to the project and add the require-dev branch in composer.jsonlaravel 4.*, the version here should be filled in 1.*"require-dev": { // ... "barryvdh/laravel-ide-helper": "2.*" // ... },
Then use the command composer update -vvv to update the package
Register 'Barryvdh\LaravelIdeHelper \IdeHelperServiceProvider' service to our application. is written to the provider in config/app.php, so that the ide-helper command exists in the artisan list. Run artisan ide-helper:generate, and PhpStorm will have the code completion function. And it has Laravel’s syntax highlighting.Laravel plug-in in PhpStorm
"post-update-cmd": [ "php artisan clear-compiled", "php artisan ide-helper:generate", "php artisan optimize" ],
php artisan ide-helper:models User
"require-dev": { "doctrine/dbal": "~2.3" },
The above is the detailed content of Develop Laravel applications using the PHPStorm editor. For more information, please follow other related articles on the PHP Chinese website!