Nova Persian Date Filter
With this package you can use persian date filter in nova.
Installation
Install package via composer:
composer require dpsoft/nova-persian-date-filterThe 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.
