maggomann/filament-only-icon-display
Composer 安装命令:
composer require maggomann/filament-only-icon-display
包简介
The package provides the `HasOnlyIcon` trait for [Filament Admin Panel v2.x](https://filamentphp.com/docs/2.x/admin/installation). With this trait it is possible to display the table actions buttons only as icon or optionally only as icon including tooltip. The package currently provides the table a
README 文档
README
Filament only icon display package for filament v2.x
This package is tailored for Filament Admin Panel v2.x.
Make sure you have installed the admin panel before you continue with the installation. You can check the documentation here
The package provides the HasOnlyIcon trait for Filament Admin Panel v2.x. With this trait it is possible to display the table actions buttons only as icon or optionally only as icon including tooltip. The package currently provides the table action buttons (CreateAction, DeleteAction, EditAction and ViewAction) that already contain the trait. Own table action buttons can be extended with the HasOnlyIcon trait, so that the methods are then available.
Supported Versions
PHP: 8.1
Laravel: 9
Installation
You can install the package via composer:
composer require maggomann/filament-only-icon-display
How is it used?
Use the supplied classes in your filament project as usual
use Filament\Resources\RelationManagers\RelationManager; use Maggomann\FilamentOnlyIconDisplay\Domain\Tables\Actions\CreateAction; use Maggomann\FilamentOnlyIconDisplay\Domain\Tables\Actions\DeleteAction; use Maggomann\FilamentOnlyIconDisplay\Domain\Tables\Actions\EditAction; use Maggomann\FilamentOnlyIconDisplay\Domain\Tables\Actions\ViewAction; class YourRelationManager extends RelationManager { public static function table(Table $table): Table { return $table ->actions([ CreateAction::make()->onlyIconAndTooltip(), // show icon and tooltip with the content of $this->name EditAction::make()->onlyIconAndTooltip(), // show icon and tooltip with the content of $this->name ViewAction::make()->onlyIconAndTooltip(), // show icon and tooltip with the content of $this->name DeleteAction::make()->onlyIconAndTooltip(), // show icon and tooltip with the content of $this->name ]) //.... } }
Or use your own table action class
use Filament\Tables\Actions\Action; use Maggomann\FilamentOnlyIconDisplay\Domain\Tables\Traits\HasOnlyIcon; class YourOwnAction extends Action { use HasOnlyIcon; } // ... // ... // ... use Filament\Resources\RelationManagers\RelationManager; use YourOwnAction; class YourRelationManager extends RelationManager { public static function table(Table $table): Table { return $table ->actions([ YourOwnAction::make('you need a name')->onlyIconAndTooltip(), ]) //.... } }
onlyIconAndTooltip() method
Displays only the icon including the tooltip.
use Filament\Tables\Actions\Action; use Maggomann\FilamentOnlyIconDisplay\Domain\Tables\Traits\HasOnlyIcon; class YourOwnAction extends Action { use HasOnlyIcon; } YourOwnAction::make('my name')->onlyIconAndTooltip(), // tooltip content: my name YourOwnAction::make('my name') ->label('my label') ->onlyIconAndTooltip(), // tooltip content: my label YourOwnAction::make('my name') ->label('my label') ->tooltip('my tooltip') ->onlyIconAndTooltip(), // tooltip content: my tooltip
onlyIcon() method
Displays only the icon without the tooltip, no matter what label, name or tooltip they provide with the classic method names.
use Filament\Tables\Actions\Action; use Maggomann\FilamentOnlyIconDisplay\Domain\Tables\Traits\HasOnlyIcon; class YourOwnAction extends Action { use HasOnlyIcon; } YourOwnAction::make('my name')->onlyIcon(), // tooltip content: no content YourOwnAction::make('my name') ->label('my label') ->onlyIcon(), // tooltip content: no content YourOwnAction::make('my name') ->label('my label') ->tooltip('my tooltip') ->onlyIcon(), // tooltip content: no content
Testing
composer test
composer test:pest-coverage
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.
Disclaimer
Please note that these packages for Filament are not officially operated by Filament and do not provide any support or warranty from the Filament team. The use of these packages is at your own risk.
This project represents unofficial extensions for Filament and is maintained by an independent community of developers. We strive to maintain compatibility with the current versions of Filament, but we cannot guarantee that the packages will function flawlessly or be compatible with future versions of Filament.
We recommend users to create backups of their projects and thoroughly test them before using these packages. If you have any questions, issues, or suggestions, we are available to assist you. However, please note that we cannot provide official support for these packages.
We would like to emphasize that Filament is a separate developer community independent of this project. For more information about Filament, please refer to the official Filament website.
Please read the license terms to learn more about the conditions for using these packages.
maggomann/filament-only-icon-display 适用场景与选型建议
maggomann/filament-only-icon-display 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 6.58k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2023 年 01 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「filament」 「maggomann」 「filament-only-icon-display」 「filament table actions」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 maggomann/filament-only-icon-display 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 maggomann/filament-only-icon-display 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 maggomann/filament-only-icon-display 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
The package translates the Eloquent models using a currently specified translation file. The Eloquent models are used internally in [filament's](https://filamentphp.com/) Resources and RelationManagers for translation. This package provides traits for the Resources and RelationManagers to translate
This Laravel package provides a minimal trait Addressable to add eloquent models using these addresses.
Alfabank REST API integration
Database-driven onboarding for Filament: progress checklists and guided spotlight tours, translatable to any locale.
An event and tournament management plugin for the Filament Admin Panel v2.x, intended for dart clubs in the first implementation. Here you can manage clubs, teams, matches, players and match days including score tables.
Laravel package for Accurate Online API integration.
统计信息
- 总下载量: 6.58k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 21
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-01-18