resolve the date debug
This commit is contained in:
@@ -71,8 +71,11 @@ class RoadPatrolReportService
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function countryActivity(string $fromDate, string $toDate): array
|
||||
public function countryActivity(Request $request): array
|
||||
{
|
||||
$fromDate = $request->from_date ? $request->from_date . ' 00:00:00' : now()->startOfDay()->toDateTimeString();
|
||||
$toDate = $request->date_to ? $request->date_to . ' 23:59:59' : now()->endOfDay()->toDateTimeString();
|
||||
|
||||
$activities = DB::select('SELECT
|
||||
"کشوری" as province_fa,
|
||||
-1 as province_id,
|
||||
@@ -124,8 +127,12 @@ class RoadPatrolReportService
|
||||
];
|
||||
}
|
||||
|
||||
public function provinceActivity(string $fromDate, string $toDate, int $provinceId): array
|
||||
public function provinceActivity(Request $request): array
|
||||
{
|
||||
$fromDate = $request->from_date ? $request->from_date . ' 00:00:00' : now()->startOfDay()->toDateTimeString();
|
||||
$toDate = $request->date_to ? $request->date_to . ' 23:59:59' : now()->endOfDay()->toDateTimeString();
|
||||
$provinceId = $request->province_id;
|
||||
|
||||
$activities = DB::select(
|
||||
'SELECT
|
||||
province_fa,
|
||||
|
||||
Reference in New Issue
Block a user