laravel blade slot
Blade: support @component and @slot directive with nesting
laravel blade slot
website laravel blade slot Slots pass markup into a component x-slot allows you to define named slots You may define the content of the named slot using the x-slot tag laravel $slot {{ $slot }} will render whatever we pass to it For example, passing Hello World! will render it on the page Slots are what make blade components composable
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 Scoped slots feature addition to Laravel's Blade templating engine The package adds two new Blade directives: @scopedslot and @endscopedslot Inspired by 沒有談太多細節、或變化型的使用,很多細節的部分應該是由開發者自行斟酌使用。Laravel 前端目前看起來是往component based 的方向在走,習慣於@extends,