承接 mokhosh/filament-rating 相关项目开发

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

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

mokhosh/filament-rating

最新稳定版本:v2.0.0

Composer 安装命令:

composer require mokhosh/filament-rating

包简介

Add rating fields and columns to Filament forms and tables

README 文档

README

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

Add beautiful and customizable rating fields and columns to Filament forms and tables.

Form Component Table Column Infolist Entry
Rating form component Rating table column Rating infolist entry

Installation

You can install the package via composer:

composer require mokhosh/filament-rating

Publish the assets so the styles are correct:

php artisan filament-rating:install

Usage

You can add a rating field to your forms like this:

use Mokhosh\FilamentRating\Components\Rating;

$form->schema([
    Rating::make(),
]);

You can add a rating column to your tables like this:

use Mokhosh\FilamentRating\Columns\RatingColumn;

$table->schema([
    RatingColumn::make(),
]);

You can add a rating entry to your infolists like this:

use Mokhosh\FilamentRating\Entries\RatingEntry;

$infolist->schema([
    RatingEntry::make(),
]);

Themes

You can choose the theme. The default value is: RatingTheme::Simple. The accepted values are: RatingTheme::Simple, RatingTheme::HalfStars, like this:

use Mokhosh\FilamentRating\RatingTheme;

$form->schema([
    Rating::make()->theme(RatingTheme::Simple),
]);

Maximum Stars

You can change the number of total stars. The default value is 5. The accepted values are number, like this:

$form->schema([
    Rating::make()->stars(10),
]);

Allowing Zero Stars

If you want to allow zero stars to be chosen, you can do so like this:

$form->schema([
    Rating::make()->allowZero(),
]);

Customizing The Size

You can customize the size of the stars. The default value is md. The accepted values are: xs, sm, md, lg and xl, like this:

$form->schema([
    Rating::make()->size('sm'),
]);

Customizing Colors

You can customize the color of the stars by choosing one of the Filament theme colors. The default value is primary. The accepted values are: danger, gray, info, primary, success and warning, like this:

$form->schema([
    Rating::make()->color('success'),
]);

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.

统计信息

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

GitHub 信息

  • Stars: 79
  • Watchers: 1
  • Forks: 12
  • 开发语言: Blade

其他信息

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