Showing 10 of 1,204 results.

Core Validators | The Validate Command

The Blade Parser library provides many validation rules out of the box. You can learn more about each of them in the following sections.

Directive Argument Spacing | The Validate Command

Class : DirectiveArgumentSpacingValidator The directive argument spacing validator will check that all directives containing arguments contain a certain amount of spaces between the directive name and its arguments. The following template: 1 @if (...

Directive Arguments Line Span | The Validate Command

Class : DirectiveArgumentsSpanningLinesValidator The line-span validator emits a validation error when the directive's arguments span more than a specified number of lines. The following template: 1 @if ( $ something 2 == $ this && 3 ' this ' == '...

Recursive Includes Validator | The Validate Command

…with filename test.blade.php ): 1 @include ( ' test ' ) produces the following validation error message: 1 Possible infinite recursion detected near [@include('test')] However, the following template would not produce a validation message: 1 @if...

Inconsistent Directive Indentation | The Validate Command

…be used to emit validation errors when a pair's opening and closing directives do not have the same indentation. The following template: 1 @if ( $ this ) 2 3 @endif produces the validation message: 1 Inconsistent indentation level of 8 for...

getRootStructures | Document Structures

Returns the direct document structures. This method automatically performs structural analysis. Only structures that are at the root of the document, without any parent node, will be returned. 1 <?php 2 3 use Illuminate \ Support \ Collection ; 4...

getRootSwitchStatements | Document Structures

Returns all the direct switch statements. This method automatically performs structural analysis. Only @switch statements that appear at the root of the document, without any parent nodes, will be returned. 1 <?php 2 3 use Illuminate \ Support \...

getRootConditions | Document Structures

Returns all the document's root conditions. This method automatically performs structural analysis. Only structures that appear at the root of the document, without any parent node, will be returned. 1 <?php 2 3 use Illuminate \ Support \...

getRootForElse | Document Structures

Returns the direct for-else blocks. This method automatically performs structural analysis. Only nodes that appear at the root of the document, without any parent nodes, will be returned. 1 <?php 2 3 use Illuminate \ Support \ Collection ; 4 5...

Upgrading from Prettier 2 | Prettier Plugin Installation

If you are upgrading from Prettier 2, note the lack of ./node_modules/ in the following paths. 1 { 2 " plugins " : [ 3 " prettier-plugin-blade " 4 ] , 5 " overrides " : [ 6 { 7 " files " : [ 8 " *.blade.php " 9 ] , 10 " options " : { 11 " parser "...