You need to add filter per unit, with the options per unit or all units.

This commit is contained in:
Djonathan 2022-07-06 17:24:29 -03:00
parent e4f7b17958
commit 19e1f52e14
2 changed files with 2 additions and 5 deletions

View File

@ -72,8 +72,7 @@ class EconomyRepository extends AbstractRepository implements EconomyContractInt
->get(); ->get();
return collect(static::checkDate($result)) return collect(static::checkDate($result))
->transform(fn($value) ->transform(fn($value) => Arr::set($value, 'mes', date_format(date_create($value['mes']), "M/Y")))
=> Arr::set($value, 'mes', date_format(date_create($value['mes']), "M/Y")))
->all(); ->all();
} }
@ -124,8 +123,7 @@ class EconomyRepository extends AbstractRepository implements EconomyContractInt
->get(); ->get();
return collect(static::checkDate($result)) return collect(static::checkDate($result))
->transform(fn($value) ->transform(fn($value) => Arr::set($value, 'mes', date_format(date_create($value['mes']), "M/Y")))
=> Arr::set($value, 'mes', date_format(date_create($value['mes']), "M/Y")))
->all(); ->all();
} }

View File

@ -4,7 +4,6 @@ declare(strict_types=1);
namespace App\Repositories\Pld; namespace App\Repositories\Pld;
use App\Helpers\Helpers;
use App\Models\Pld; use App\Models\Pld;
use App\Repositories\AbstractRepository; use App\Repositories\AbstractRepository;
use Carbon\Carbon; use Carbon\Carbon;