PHP code example of dpsoft / nova-persian-date-filter
1. Go to this page and download the library: Download dpsoft/nova-persian-date-filter library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dpsoft / nova-persian-date-filter example snippets
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);
}
}