ariaieboy/filament-jalali-datetime

filament表格构建器的一个贾拉利日期时间列

1.4.1 2024-04-23 12:21 UTC

This package is auto-updated.

Last update: 2024-09-23 13:22:34 UTC


README

Ariaieboy Jalali DateTime

filament表格构建器的一个贾拉利日期时间列

Latest Version on Packagist GitHub Actions Workflow Status Total Downloads

此包将为filament表格构建器添加贾拉利日期时间列

安装

您可以通过composer安装此包

composer require ariaieboy/filament-jalali-datetime

您可以使用以下命令发布配置文件

php artisan vendor:publish --tag="filament-jalali-datetime-config"

这是发布配置文件的内容

// config for Ariaieboy/FilamentJalaliDatetime
return [
    'date_format'=>'Y/m/d',
    'date_time_format'=>'Y/m/d H:i:s',
];

使用方法

//instead of this :
use Filament\Tables\Columns\TextColumn;
 
TextColumn::make('created_at')->dateTime()

//Since v1.2 you can use the code below to show Jalali date and dateTime

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

//you can use the code below for jalali datetime
use Ariaieboy\FilamentJalaliDatetime\JalaliDateTimeColumn;
 
JalaliDateTimeColumn::make('created_at')->dateTime() // it will show the date like this : 1401/03/15 20:18:52
//or
JalaliDateTimeColumn::make('created_at')->date() // it will show the date like this : 1401/03/15

测试

composer test

变更日志

请参阅变更日志了解最近的变化信息。

贡献

请参阅贡献指南以获取详细信息。

安全漏洞

请查看我们的安全策略了解如何报告安全漏洞。

鸣谢

许可证

MIT许可证(MIT)。请参阅许可证文件以获取更多信息。