sonja-turo/duckmode-filament 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

sonja-turo/duckmode-filament

最新稳定版本:0.1.0

Composer 安装命令:

composer require sonja-turo/duckmode-filament

包简介

Duck Mode plugin for FilamentPHP

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This is what you get when you have a slow Saturday night and nobody around to annoy. You annoy the rest of the world.

Installation

Firstly, pour yourself a large draw of your favourite drink. Don't mind me, I'll wait.

...

Ok, done? Now, install the package via composer:

composer require sonja-turo/duckmode-filament

Next, because Duck Mode without Quacking is just a silly package instead of the life changing experience it was designed to be, install the assets:

php artisan vendor:publish --tag="duckmode-filament-assets"

Usage

Adding Duck Mode to your admin panel

Firstly, register the plugin with your panel. It's easy, don't be shy, just open the relevant FilamenttPHP Panel Provider, and add the plugin file.

use Sonjaturo\DuckmodeFilament\DuckmodeFilamentPlugin;
...
public function panel(Panel $panel): Panel
{
    return $panel
        ...
        ->plugin(DuckmodeFilamentPlugin::make());
}

Feeder Widget

Add the Feeder Widget to anywhere in your FilamentPHP dashboard by appending it to the widgets array in your panel's configuration. Starvation and murders are tracked over time.

use Sonjaturo\DuckmodeFilament\Bread;
use Sonjaturo\DuckmodeFilament\BreadType;
use Sonjaturo\DuckmodeFilament\FeederWidget;
...
public function panel(Panel $panel): Panel
{
    return $panel
        ...
        ->widgets([
            Widgets\AccountWidget::class,
            Widgets\FilamentInfoWidget::class,
            FeederWidget::make([
                'starvationRate' => 1000,
                'bread' => new Bread(BreadType::White)
            ]),
        ]);
}

Set the starvationRate to the number of milliseconds for each tick that your's health deteriorates.

The optional bread parameter can be one of the known bread types: White, Brown, Multigrain, GlutenFree, Pita, Turkish, Raisin, Dwarf or None. The default is White.

Table Quactions

To add quacking to any of your Filament table definitions, just add a Quaction to your table actions.

use Sonjaturo\DuckmodeFilament\Tables\Quaction;
...
public function table(Table $table): Table
{
    return $table
        ...
        ->actions([
            Quaction::make(),
        ]);
}

Testing

I didn't do any. Why should I make you?

Changelog

Please see CHANGELOG for more information on what has changed recently, or to read something that is most likely horribly wrong.

Contributing

Please see CONTRIBUTING for details. You know I never bothered to read the stub for this, right?

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities. Nope, didn't read this either. But you're installing this anyway, and even I'm telling you not to. Says more about you than it does me.

Credits

License

The MIT License (MIT). Please see License File for more information. My God, you read this far.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-03-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固