PHP code example of charlieetienne / toggle-buttons-column

1. Go to this page and download the library: Download charlieetienne/toggle-buttons-column 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/ */

    

charlieetienne / toggle-buttons-column example snippets


use CharlieEtienne\ToggleButtonsColumn\ToggleButtonsColumn;

ToggleButtonsColumn::make('status')
    ->options([
        'unsigned' => 'Unsigned',
        'present' => 'Present',
        'absent' => 'Absent',
    ])
    ->icons([
        'unsigned' => Heroicon::Clock,
        'present' => Heroicon::Check,
        'absent' => Heroicon::XMark,
    ])
    ->colors([
        'unsigned' => 'warning',
        'present' => 'success',
        'absent' => 'danger',
    ]),

    ToggleButtonsColumn::make('status')
        ->options(OrderStatus::class)

    ToggleButtonsColumn::make('status')
        ->grouped()
        ->options(OrderStatus::class)