laravel blade slot
laravel blade slot
laravel blade slot
website laravel blade slot After reading the official blade docs, it mentions we need to include @props to access the attributes propery of the slot's variable laravel slot class={{ $class ?? '' }} > {{ $slot }} button> form> You can use it like this perform an action x-form-button :action=route
laravel blade slot slot }} button> Here, we have created a simple button component that includes some CSS classes and a slot for the button text To use the slot name This can be done using the x-slot tag - which itself is sort of a pre-defined Blade component that comes out of the box with Laravel Blade Templates Introduction; Template Inheritance Defining A Layout; Extending A Layout Components & Slots; Displaying Data Blade & JavaScript Frameworks