定制 ariaieboy/filament-jalali 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

ariaieboy/filament-jalali

Composer 安装命令:

composer require ariaieboy/filament-jalali

包简介

Add Jalali/Shamsi support for FilamentPHP

README 文档

README

Ariaieboy Filament Jalali Latest Version on Packagist GitHub Actions Workflow Status Total Downloads

This package adds Jalali/Shamsi support to filament v5 for filament v4 check branch v2 and for filament v3 check branch v1.

We have Jalali/Shamsi support for DatePicker,DateTimePicker,TextColumn, TextEntry and DateConstraint.

It's a replacement for ariaieboy/filament-jalali-datetime and ariaieboy/filament-jalali-datetimepicker. For Upgrade guide check here

Installation

You can install the package via composer:

composer require ariaieboy/filament-jalali

Usage

use Filament\Forms\Components\DatePicker;
use Filament\Forms\Components\DateTimePicker;

DatePicker::make('birth_date')->jalali();
DateTimePicker::make('birth_date')->jalali(weekdaysShort: true);
DateTimePicker::make('birth_date')->jalali(weekdaysShort: true)->hasToday(); // add a today button that when use press on it the date will be set to today

For more information check the default DateTimePicker Docs

use Filament\Tables\Columns\TextColumn;

TextColumn::make('created_at')->jalaliDate();
TextColumn::make('created_at')->jalaliDateTime();

For more information check the default TextColumn Docs

use Filament\Infolists\Components\TextEntry;

TextEntry::make('created_at')->jalaliDate();
TextEntry::make('created_at')->jalaliDateTime();
TextEntry::make('created_at')->since()->jalaliDateTooltip();
TextEntry::make('created_at')->since()->jalaliDateTimeTooltip();

For more information check the default TextEntry Docs

use Filament\Tables\Filters\QueryBuilder\Constraints\DateConstraint;
use Ariaieboy\FilamentJalali\DateConstraint\Operators\IsJalaliAfterOperator;
use Ariaieboy\FilamentJalali\DateConstraint\Operators\IsJalaliBeforeOperator;
use Ariaieboy\FilamentJalali\DateConstraint\Operators\IsJalaliDateOperator;
use Ariaieboy\FilamentJalali\DateConstraint\Operators\IsJalaliYearOperator;

DateConstraint::make('created_at')->jalali();
//Or you can use any operations that you like
DateConstraint::make('created_at')->operators([
        IsJalaliAfterOperator::class,
        IsJalaliBeforeOperator::class,
        IsJalaliDateOperator::class,
        IsJalaliYearOperator::class
]);

For more information check the default DateConstraint Docs

We don't support IsJalaliMonthOperator since there is not and efficient way to query georgian month according to the jalali/shamsi month.

Fill free to open a PR that adds IsJalaliMonthOperator if you have an algorithm to convert jalali/shamsi month to georgian month.

Localization

We support localization for Persian (Farsi), English, Pashto, Dari out of the box. To enable it, you need to set your application's locale to fa,en,fa_AF,ps in the config/app.php file:

'locale' => 'fa' // or 'en' for english, 'fa_AF' dari, 'ps' for pashto

You can publish the localization files to customize them:

php artisan vendor:publish --tag="filament-jalali-translations"

Changelog

Please see CHANGELOG for more information on what has changed recently.

Upgrade

from v2

If you are using the V2 of the ariaieboy/filament-jalali you need to change the package version in your composer.json to

{
    "require": {
        "ariaieboy/filament-jalali": "^3.0"
    }
}

Then run composer update command.

from v1

If you are using the V1 of the ariaieboy/filament-jalali you need to change the package version in your composer.json to

{
    "require": {
        "ariaieboy/filament-jalali": "^2.0"
    }
}

Then run composer update command.

from ariaieboy/filament-jalali-datetimepicker

If you are using the V3 of the jalali-datetimepicker you don't need to do anything just replace ariaieboy/filament-jalali-datetimepicker with ariaieboy/filament-jalali

from ariaieboy/filament-jalali-datetime

If you use the jalaliDate() and jalaliDateTime() on the TextColumn you can upgrade without any problem.

But if you use the JalaliDateTimeColumn you need to change it to TextColumn and convert dateTime() to jalaliDateTime() and date() to jalaliDate()

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.

ariaieboy/filament-jalali 适用场景与选型建议

ariaieboy/filament-jalali 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 22.15k 次下载、GitHub Stars 达 38, 最近一次更新时间为 2024 年 10 月 24 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「laravel」 「ariaieboy」 「filament-jalali-datetimepicker」 「filament-jalali-support」 「filament-shamsi-calendar」 「filament-shamsi-support」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 ariaieboy/filament-jalali 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 ariaieboy/filament-jalali 我们能提供哪些服务?
定制开发 / 二次开发

基于 ariaieboy/filament-jalali 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 22.15k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 38
  • 点击次数: 35
  • 依赖项目数: 6
  • 推荐数: 0

GitHub 信息

  • Stars: 38
  • Watchers: 1
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-10-24