8000 add attribute spread operator by Gummibeer · Pull Request #112 · spatie/laravel-blade-x · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

add attribute spread operator #112

Merged
merged 6 commits into from
Mar 2, 2020
Merged

add attribute spread operator #112

merged 6 commits into from
Mar 2, 2020

Conversation

Gummibeer
Copy link
Contributor
@Gummibeer Gummibeer commented Jan 29, 2020

solves #97

@AlexVanderbist this is the first solution I've found. It uses array_merge() to combine the spreaded attribute with the normal ones.

What do you think?

If any attribute is available twice the priority is right over left and plain over spread. The added test case covers this.

<text-field 
  before="the spreaded attribute" 
  ...$input 
  ...$email 
  :var="$foo"
  text="true" 
  label="E-Mail"
/>
array_merge($input,$email,['before' => 'the spreaded attribute','var' => $foo,'text' => 'true','label' => 'E-Mail']))

Copy link
Member
@AlexVanderbist AlexVanderbist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of questions left but the important parts look good to me!

@AlexVanderbist
Copy link
Member

I'm working on #115 for the snapshot driver but tests are failing. Will fix this after lunch :)

@Gummibeer
Copy link
Contributor Author

@AlexVanderbist you don't have to adjust anything - was my fault. It works now! :)

8000
@AlexVanderbist AlexVanderbist merged commit f7e2893 into spatie:master Mar 2, 2020
@AlexVanderbist
Copy link
Member

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0