承接 burdziakm/filament-generators 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

burdziakm/filament-generators

最新稳定版本:v1.0.1

Composer 安装命令:

composer require burdziakm/filament-generators

包简介

A collection of Artisan generators providing clean, modular building blocks for Filament applications.

README 文档

README

A collection of Artisan generators providing clean, modular building blocks for FilamentPHP applications.

Forms

To create a Filament Form class, use the following command:

php artisan make:filament-form Model

Replace Model with the name of your model. For example, if your model is named Car:

php artisan make:filament-form Car

This will generate a new file:

Filament Form [app/Filament/Forms/CarForm.php] created successfully.

With the following template:

<?php

namespace App\Filament\Forms;

use Filament\Forms\Form;

class CarForm
{
    public function build(Form $form): Form
    {
        return $form->schema([
            //
        ]);
    }
}

You can then move the form logic from your Resource to this CarForm class and use it like this:

public static function form(Form $form): Form
{
    return app(\App\Filament\Forms\CarForm::class)->build($form);
}

Tables

Similarly, you can create Filament Table classes:

php artisan make:filament-table Model

For example:

php artisan make:filament-table Car

This will generate:

Filament Table [app/Filament/Tables/CarsTable.php] created successfully.

With the following template:

<?php

namespace App\Filament\Tables;

use Filament\Tables\Table;

class CarsTable
{
    public function build(Table $table): Table
    {
        return $table->columns([
            //
        ]);
    }
}

You can then use it in your Resource file:

public static function table(Table $table): Table
{
    return app(\App\Filament\Tables\CarsTable::class)->build($table);
}

✨ Notes

  • Form classes end with Form, Table classes end with Table in plural form.
  • This package helps keep your Filament Resources clean by separating form and table definitions into dedicated classes.

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-09-19