PHP code example of eduardoribeirodev / laravel-scoped-slots
1. Go to this page and download the library: Download eduardoribeirodev/laravel-scoped-slots library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
eduardoribeirodev / laravel-scoped-slots example snippets
blade
<table>
<thead>
<tr>
@foreach($columns as $column)
{{ $header($column) }}
@endforeach
</tr>
</thead>
<tbody>
@foreach($data as $index => $row)
{{ $row($row, $index) }}
@endforeach
</tbody>
</table>
blade
@php $highlightColor = 'red'; @endphp
<x-list :items="$users" let="user">
<!-- $highlightColor is automatically available here! -->
<span style="color: {{ $highlightColor }}">{{ $user->name }}</span>
</x-list>