Skip to content

Passing props from x-dynamic-component to blade file #51921

Answered by diogogpinto
diogogpinto asked this question in Q&A
Discussion options

You must be logged in to vote

I think I solved it, won't delete it because it may help other people. Feel free to delete!

<x-dynamic-component :component="$component" :attributes="new Illuminate\View\ComponentAttributeBag($props)" />

Instead of passing :props, you must pass :attributes by initiating a new ComponentAttributeBag. Thank you everyone!

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@SeriousKen
Comment options

Answer selected by diogogpinto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants