tomatophp/filament-helpers

帮助类生成器,用于管理您在 filament 应用中的表单和表格

v1.0.0 2024-05-11 20:18 UTC

This package is auto-updated.

Last update: 2024-09-23 11:33:27 UTC


README

Screenshot

Filament 帮助类

Latest Stable Version License Downloads

帮助类生成器,用于管理您在 filament 应用中的表单和表格

屏幕截图

Command

安装

composer require tomatophp/filament-helpers --dev

使用

要生成一个新的帮助类,可以使用此命令

php artisan filament:helpers

并选择类型和名称,您可以在模块内或您的资源内选定的路径生成类。

使用生成的类

您可以使用生成的类如下

use App\Filament\Resources\AccountResource\Forms\UserForm;

public function form(Form $form): Form
{
    return UserForm::make($form);
}
use App\Filament\Resources\AccountResource\Tables\UserTable;

public function form(Table $table): Table
{
    return UserTable::make($table);
}
use App\Filament\Resources\AccountResource\Actions\UserActions;

public function table(Table $table): Table
{
    return $table->actions(UserActions::make());
}
use App\Filament\Resources\AccountResource\Actions\UserFilters;

public function table(Table $table): Table
{
    return $table->filters(UserFilters::make());
}

其他 Filament 包

查看我们的Awesome TomatoPHP