In a Laravel blade component file, we can pass through attributes given to us into an HTML tag like this:
<div {{ $attributes->merge(['class' => 'alert alert-'.$type]) }}>
{{ $message }}
</div>
And we can call another custom component like this:
<x-alert message="Look out!" :title="$title" />
However, how can I pass through all attributes given to us (including "class" and "onclick", etc) into a component? I would like to do this, but it complains at me.
<x-alert message="Look out!" {{ $attributes->merge(['title' => 'Hey!']) }} />
Thanks!