1. Go to this page and download the library: Download tomatophp/filament-helpers 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/ */
tomatophp / filament-helpers example snippets
use App\Filament\Resources\Users\Forms\UserForm;
use Filament\Schemas\Schema;
public static function form(Schema $schema): Schema
{
return UserForm::make($schema);
}
use App\Filament\Resources\Users\Tables\UserTable;
use Filament\Tables\Table;
public static function table(Table $table): Table
{
return UserTable::make($table);
}
use App\Filament\Resources\Users\Actions\UserActions;
use App\Filament\Resources\Users\Filters\UserFilters;
public static function table(Table $table): Table
{
return $table
->recordActions(UserActions::make())
->filters(UserFilters::make());
}