[5.8] Add @componentFirst Directive#28783
Merged
taylorotwell merged 1 commit intolaravel:5.8from Jun 11, 2019
browner12:component-first
Merged
[5.8] Add @componentFirst Directive#28783taylorotwell merged 1 commit intolaravel:5.8from browner12:component-first
@componentFirst Directive#28783taylorotwell merged 1 commit intolaravel:5.8from
browner12:component-first
Conversation
- add the compilation - add the `startComponentFirst` method, which uses the View Factory to find the first view given that actually exists. - add a test for the compilation.
browner12
added a commit
to browner12/docs
that referenced
this pull request
Jun 18, 2019
for laravel/framework#28783 I was going to hold off until I had PR'ed `componentWhen` and `componentIf`, but those are proving to be a little more difficult, so getting these docs in now.
gdebrauwer
pushed a commit
to gdebrauwer/docs
that referenced
this pull request
Jun 20, 2019
for laravel/framework#28783 I was going to hold off until I had PR'ed `componentWhen` and `componentIf`, but those are proving to be a little more difficult, so getting these docs in now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
@componentand@includeBlade directives perform the same function with 2 distinctions.@components allow you to pass in data via@slots.@components only access variables passed to them, while@includes access all variables currently defined.Even though these directives are so similar,
@includegets some additional variations that are very useful.@includeWhen@includeIf@includeFirstIdeally, both the components and includes would maintain parity between these variations. This PR starts towards that goal by adding a
@componentFirstdirective.