wiserwebsolutions/filament-extras
Composer 安装命令:
composer require wiserwebsolutions/filament-extras
包简介
This is my package filament-extras
README 文档
README
This is a package withs some "missing" features from the standard filament package. It is very much in development but probably can be used in production. Be careful or whatever.
Installation
You can install the package via composer:
composer require wiserwebsolutions/filament-extras
You can publish and run the migrations with:
php artisan vendor:publish --tag="filament-extras-migrations"
php artisan migrate
You can publish the config file with:
php artisan vendor:publish --tag="filament-extras-config"
Optionally, you can publish the views using
php artisan vendor:publish --tag="filament-extras-views"
This is the contents of the published config file:
return [
];
Usage
Register the Plugin
Add the plugin to your Filament panel in a service provider or your Filament config:
use FilamentExtras\FilamentExtrasPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugin(FilamentExtrasPlugin::make());
}
Table Actions
This package provides extra table actions for Filament:
ArchiveActionandArchiveBulkAction: Archive records with confirmation dialogs.EditBulkAction: Edit multiple records at once.DefaultActionGroup: Quickly add a group of common actions to your tables.
Example usage in a Filament table resource:
use FilamentExtras\Tables\Actions\ArchiveAction;
use FilamentExtras\Tables\Actions\ArchiveBulkAction;
use FilamentExtras\Tables\Actions\EditBulkAction;
use FilamentExtras\Tables\Actions\DefaultActionGroup;
public static function table(Table $table): Table
{
return $table
->actions([
DefaultActionGroup::make(),
EditBulkAction::make(),
ArchiveAction::make(),
ArchiveBulkAction::make(),
]);
}
Form Components
Extra form components are available:
ToggleButtonsSeparatorRepeater(compact view)PhoneInput
Example usage in a Filament form:
use FilamentExtras\Forms\Components\ToggleButtons;
use FilamentExtras\Forms\Components\Separator;
use FilamentExtras\Forms\Components\Repeater;
use FilamentExtras\Forms\Components\PhoneInput;
public static function form(Form $form): Form
{
return $form
->schema([
ToggleButtons::make('status'),
Separator::make()->label('Details'),
Repeater::make('items')->compact(),
PhoneInput::make('phone'),
]);
}
Facade
You can use the provided facade for direct access:
use FilamentExtras\Facades\FilamentExtras;
FilamentExtras::someMethod();
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 50
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-02-22