PHP code example of kingmaker / filament-flex-layout
1. Go to this page and download the library: Download kingmaker/filament-flex-layout 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/ */
kingmaker / filament-flex-layout example snippets
Flex::make([])
->gap(4) // will be translated to `gap-4` tailwind class
use Kingmaker\FilamentFlexLayout\Enums\HorizontalArrangement;
use Kingmaker\FilamentFlexLayout\Forms\Flex;
Flex::make([
Forms\Components\Toggle::make('user_like')
->grow(false) // <<-- Important
->onIcon('heroicon-s-heart')
->offIcon('heroicon-o-heart')
->onColor('danger')
->offColor('gray'),
Forms\Components\Toggle::make('user_read')
->grow(false) // <<-- Important
->onIcon('heroicon-s-book-open')
->offIcon('heroicon-s-book-open')
->onColor('success')
->offColor('gray'),
])
->horizontalArrangement(HorizontalArrangement::Evenly)
use Kingmaker\FilamentFlexLayout\Enums\HorizontalArrangement;
use Kingmaker\FilamentFlexLayout\Infolists\Flex;
Flex::make([])
->horizontalArrangement(HorizontalArrangement::Evenly)
->gap(12)