Phpstorm Blade



  1. Phpstorm Blade Live Templates
  2. Phpstorm Blade Files
  3. Phpstorm Blades
  4. Phpstorm Blade Autocomplete
  1. Blade templates are often composed of various includes of small, reusable blocks which are nothing more than other templates. We can also extend templates and provide content for additional sections. PhpStorm and the Laravel plugin provide completion for template names in both @extends and @include directives. Completion results will include.
  2. What is the recommended way to stop PHPStorm complaining about my custom blade components? I can click "Add x-button to custom HTML tags" bu.
  3. Supports the Blade template language used by the Laravel Web framework for PHP.

Phpstorm中大量使用composer或命令行指令,所以需要设置合适的php命令 # Blade. PHPstorm 默认支持Laravel的blade 模板提示,但我们需要定义一下快捷键。 # 创建项目. 软件启动时 Create New Project 或 选择菜单 Filenew Project ,下面是演示安装 Laravel 项目 # Laravel Plugin. The most concise screencasts for the working developer, updated daily. There's no shortage of content at Laracasts. In fact, you could watch nonstop for days upon days, and still not see everything!

Phpstorm BladeFeaturesPhpstorm Blade

In PhpStorm 2019.1, we’ve implemented debugging of Twig and Blade templates.

The problem was that template files are not the files your application runs. They are first compiled into regular PHP and saved to a cache directory, and then the application runs those compiled files.

Blade

So before PhpStorm 2019.1, your only option was to identify the compiled file, something like b84f5d6c0f0d85bb9187843.php, locate the line you want to place a breakpoint on, and then debug this file instead.

Luckily, things have changed, and you can now debug your template files directly – there’s no difference between them and regular PHP files in this regard.

Blade

To start debugging your templates:

  1. Set up your PHP debugger.
  2. In PhpStorm, go to Settings/Preferences | Languages & Frameworks | PHP | Debug | Templates and specify the directories where your compiled files are stored:

Phpstorm Blade Live Templates

In the case of Twig, you also need to set the following configuration options:
debug: true
auto_reload: true

In the case of Laravel, just make sure you’re using version 5.8 or later, and you’re good to go.

Phpstorm Blade Files

Now, set a breakpoint directly in your template file, just like you would with a PHP file, and begin step debugging!

Phpstorm Blades

New to debugging in PhpStorm? Check out the Ultimate Debugging Guide or this Quickstart video on getting started with debugging in Docker.

Phpstorm Blade Autocomplete

Your JetBrains PhpStorm Team
The Drive to Develop