PHP code example of theunwindfront / laravel-blade-variants
1. Go to this page and download the library: Download theunwindfront/laravel-blade-variants 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/ */
theunwindfront / laravel-blade-variants example snippets
html
<button {{ $attributes->class([
'px-4 py-2 rounded',
'bg-blue-600 hover:bg-blue-700' => $variant === 'primary',
'bg-gray-100 text-gray-900' => $variant === 'secondary',
]) }}>