Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ariaieboy/filament-jalali-datetime
a jalali datetime column for filament table builder
https://github.com/ariaieboy/filament-jalali-datetime
filament laravel livewire
Last synced: 2 months ago
JSON representation
a jalali datetime column for filament table builder
- Host: GitHub
- URL: https://github.com/ariaieboy/filament-jalali-datetime
- Owner: ariaieboy
- License: mit
- Created: 2022-06-05T12:44:07.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-23T12:21:39.000Z (9 months ago)
- Last Synced: 2024-05-21T08:12:06.617Z (8 months ago)
- Topics: filament, laravel, livewire
- Language: PHP
- Homepage:
- Size: 44.9 KB
- Stars: 14
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# This package is no longer maintained please upgrade to [ariaieboy/filament-jalali](https://github.com/ariaieboy/filament-jalali)
![Ariaieboy Jalali DateTime](https://preview.dragon-code.pro/Ariaieboy/Jalali-DateTime.svg?brand=laravel)
# a Jalali DateTime Column for filament table builder[![Latest Version on Packagist](https://img.shields.io/packagist/v/ariaieboy/filament-jalali-datetime.svg?style=flat-square)](https://packagist.org/packages/ariaieboy/filament-jalali-datetime)
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/ariaieboy/filament-jalali-datetime/php-cs-fixer.yml?label=styling)
[![Total Downloads](https://img.shields.io/packagist/dt/ariaieboy/filament-jalali-datetime.svg?style=flat-square)](https://packagist.org/packages/ariaieboy/filament-jalali-datetime)This package will add a Jalali DateTime Column for filament table builder
## Installation
You can install the package via composer:
```bash
composer require ariaieboy/filament-jalali-datetime
```You can publish the config file with:
```bash
php artisan vendor:publish --tag="filament-jalali-datetime-config"
```This is the contents of the published config file:
```php
// config for Ariaieboy/FilamentJalaliDatetime
return [
'date_format'=>'Y/m/d',
'date_time_format'=>'Y/m/d H:i:s',
];
```## Usage
```php
//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```
## Testing
```bash
composer test
```## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Contributing
Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.
## Security Vulnerabilities
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
## Credits
- [AriaieBOY](https://github.com/ariaieboy)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.