Skip to content

Conversation

@biinari
Copy link

@biinari biinari commented Dec 15, 2025

Add directives and make some small corrections for directives introduced from laravel 5.6 to 12.x.

Some of these directives seem to be missing from laravel documentation, for which searching for the "@example" directive in their tests or compileExample in Illuminate\View\Compilers\Concerns namespace is a little helpful.

Notes

  • @endPrependOnce is not documented so I have assumed it should be written to be consistent with @endPushOnce.
  • Directives are parsed by blade as case-insensitive (due to php methods being case-insensitive).

@biinari biinari force-pushed the feat/directives_12.x branch from 32c83c5 to e8db81c Compare December 16, 2025 15:01
@biinari biinari marked this pull request as draft December 19, 2025 20:25
Add tests for conditionals and loops
Add attribute directives for use in html tags (or similar).
note: `@endPrependOnce` is not documented for a preferred mix of
upper/lower case, so assuming it should be written consistent with
`@endPushOnce`.

Directives are compiled by blade as case-insensitive.
This directive uses double `@@`.
Add tests to show `@error` ... `@enderror`
Outputs true / false as a string for use in attribute values or js
Undocumented alternative to `{{ Js::from(...) }}`
Undocumented `@extendsFirst` extends the first view that exists in given list
start words are expressed without needing a whole word match.
@biinari biinari force-pushed the feat/directives_12.x branch from 47799c6 to ab7ad73 Compare December 19, 2025 20:52
@biinari biinari marked this pull request as ready for review December 19, 2025 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant