Using macros with Blade component attributes
β twitter.com
π‘ Advanced @laravelphp tip!
— Pascal Baljet (@pascalbaljet) February 3, 2021
If you're using the $attributes variable in a Blade Component, you're using the ComponentAttributeBag class, which is macroable π
I wrote a macro to dynamically toggle classes by accepting an array, just like v-bind:class in Vue.js! #Laravel #PHP pic.twitter.com/Uis7hykv20
Read more [twitter.com]
