More flexible Laravel 7 Blade X components
Laravel 7 introduced Blade components using x- syntax. This is pretty cool feature and gives additional functionality comparing to what we know from Laravel 6. But let’s focus on passing content to components and see what is available. Let’s assume we have component like this:
1 2 3 4 5 6 7 |
{{-- components/header.blade.php -- }} <h1 class="page-header my-4 text-gray-900"> <span> {{ $slot }} </span> </h1> |
In Laravel 6 we had to use it like … [Read more…]