1. Go to this page and download the library: Download drafolin/filament-collapse 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/ */
drafolin / filament-collapse example snippets
use Drafolin\FilamentCollapse\FilamentCollapse;
public function form(Form $form)
{
return form
->schema([
FilamentCollapse::make([
// Add fields here. Ideally, these fields should be related.
// For now, it's only been tested with TextInput fields, and fields that inherit from it.
TextInput::make('first_name')
->label('First Name'), // Labels are transformed into placeholders.
TextInput::make('last_name')
->label('Last Name'),
])
->label('Collapse Group'), // This field is a regular field, so it also supports base filament properties.
]);
}