Level 20
Look for this 1st parameter is Boolean as you have passed the if Boolean condition and then view name and 3rd parameter if you want to pass any data to the view..
If you would like to @include a view if a given boolean expression evaluates to true or false, you may use the @includeWhen and @includeUnless directives:
@includeWhen($boolean, 'view.name', ['status' => 'complete'])
@includeUnless($boolean, 'view.name', ['status' => 'complete'])
Note ___
@includeWhen($condition, 'view'): Includes the view when the condition is true.
@includeUnless($condition, 'view'): Includes the view when the condition is false
1 like