dpsoft / nova-persian-date-filter
A Laravel Nova filter.
Installs: 3 665
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 2
Forks: 0
Open Issues: 0
Language:Vue
Requires
- php: >=7.1.0
This package is auto-updated.
Last update: 2024-11-29 06:03:48 UTC
README
With this package you can use persian date filter in nova.
Installation
Install package via composer:
composer require dpsoft/nova-persian-date-filter
The package will automatically register itself.
Usage
Extend Dpsoft\NovaPersiandateFilter\PersianDateFilter
and in apply
method parse value with Carbon
and use in query
:
<?php namespace App\Nova\Filters; use Dpsoft\NovaPersiandateFilter\PersianDateFilter; ... class InvoicesFrom extends PersianDateFilter { public function apply(Request $request, $query, $value) { $value = Carbon::parse($value)->startOfDay(); return $query->where('created_at', ">=", $value); } }
Security
If you discover any security related issues, please email sadeghpm@gmail.com
instead of using the issue tracker.