From 5cc94f474429b90d132e21a92e0143fbae5e9eaf Mon Sep 17 00:00:00 2001 From: Djonathan Date: Fri, 17 Jun 2022 09:55:21 -0300 Subject: [PATCH] Corrections and minor adjustments in the api. --- app/Helpers/CustomHelpers.php | 8 + app/{Helper => Helpers}/Helpers.php | 2 +- app/{Helper => Helpers}/Model/EntityJson.php | 2 +- .../Model/ModelExtractor.php | 2 +- .../Model/TableExtractor.php | 2 +- .../Model/filter/FieldFilterBuilder.php | 2 +- .../Model/filter/FilterBuilder.php | 4 +- .../Model/filter/FilterBuilderFactory.php | 2 +- .../Model/filter/FilterBuilderResponse.php | 2 +- .../Model/filter/FilterItem.php | 4 +- .../Model/filter/FilterType.php | 2 +- .../Model/filter/IFilterBuilder.php | 2 +- .../Model/filter/OrderItem.php | 2 +- app/Http/Controllers/EconomyController.php | 76 +-- app/Http/Controllers/FaqController.php | 32 +- .../Controllers/NotificationController.php | 26 +- ...ler.php => OperationSummaryController.php} | 4 +- app/Http/Controllers/PldController.php | 26 +- app/Http/Controllers/UserController.php | 27 +- app/Http/Kernel.php | 4 +- app/Http/Requests/AzuxRequest.php | 4 +- app/Http/Resources/EconomyResource.php | 19 + app/Http/Resources/FaqResource.php | 19 + app/Http/Resources/PldResource.php | 19 + app/Interface/RepositoryInterfaces.php | 1 + app/Models/DadosCadastrais.php | 1 - app/Models/DadosTe.php | 7 +- app/Models/Economy.php | 7 +- app/Models/Faq.php | 1 - app/Models/Notifications.php | 1 - app/Models/Pld.php | 1 - app/Models/Role.php | 5 + app/Models/Scopes/UserScope.php | 33 + app/Models/User.php | 1 - app/Repositories/ContractInterface.php | 1 + .../DadosTe/DadosTeRepository.php | 9 +- .../Economy/EconomyContractInterface.php | 7 +- .../Economy/EconomyRepository.php | 76 ++- app/Repositories/MethodsTrait.php | 11 + app/Repository/AbstractRepository.php | 67 -- app/Repository/Economy/EconomyRepository.php | 56 -- app/Repository/Med5min/Med5minRepository.php | 20 - app/Repository/Pld/PldRepository.php | 20 - app/Repository/Repository.php | 54 -- app/Support/FilterBuilder/FilterType.php | 17 +- composer.json | 5 +- composer.lock | 598 +++++++++--------- routes/api.php | 21 +- 48 files changed, 639 insertions(+), 673 deletions(-) create mode 100644 app/Helpers/CustomHelpers.php rename app/{Helper => Helpers}/Helpers.php (96%) rename app/{Helper => Helpers}/Model/EntityJson.php (99%) rename app/{Helper => Helpers}/Model/ModelExtractor.php (99%) rename app/{Helper => Helpers}/Model/TableExtractor.php (99%) rename app/{Helper => Helpers}/Model/filter/FieldFilterBuilder.php (93%) rename app/{Helper => Helpers}/Model/filter/FilterBuilder.php (98%) rename app/{Helper => Helpers}/Model/filter/FilterBuilderFactory.php (91%) rename app/{Helper => Helpers}/Model/filter/FilterBuilderResponse.php (95%) rename app/{Helper => Helpers}/Model/filter/FilterItem.php (97%) rename app/{Helper => Helpers}/Model/filter/FilterType.php (98%) rename app/{Helper => Helpers}/Model/filter/IFilterBuilder.php (90%) rename app/{Helper => Helpers}/Model/filter/OrderItem.php (97%) rename app/Http/Controllers/{OperationController.php => OperationSummaryController.php} (91%) create mode 100644 app/Http/Resources/EconomyResource.php create mode 100644 app/Http/Resources/FaqResource.php create mode 100644 app/Http/Resources/PldResource.php create mode 100644 app/Models/Scopes/UserScope.php delete mode 100644 app/Repository/AbstractRepository.php delete mode 100644 app/Repository/Economy/EconomyRepository.php delete mode 100644 app/Repository/Med5min/Med5minRepository.php delete mode 100644 app/Repository/Pld/PldRepository.php delete mode 100644 app/Repository/Repository.php diff --git a/app/Helpers/CustomHelpers.php b/app/Helpers/CustomHelpers.php new file mode 100644 index 0000000..a62b931 --- /dev/null +++ b/app/Helpers/CustomHelpers.php @@ -0,0 +1,8 @@ +hasUser() && !is_null($client_id); + } +} diff --git a/app/Helper/Helpers.php b/app/Helpers/Helpers.php similarity index 96% rename from app/Helper/Helpers.php rename to app/Helpers/Helpers.php index 262fa2d..5488d0c 100644 --- a/app/Helper/Helpers.php +++ b/app/Helpers/Helpers.php @@ -1,7 +1,7 @@ economyContract->selectGlobal($request->all()); + return (new EconomyResource($response)) + ->response() + ->setStatusCode(Response::HTTP_OK); + } catch (\Exception $ex) { + return $this->errorResponse(false, $ex->getMessage(), Response::HTTP_INTERNAL_SERVER_ERROR); + } + + } + + public function grossAnnualEconomy(Request $request): JsonResponse { try { - $response = $this->economyContract->getGrossEconomy($request->all()); - - return $this->successResponse($response); + $response = $this->economyContract->getGrossAnnualEconomy($request->all()); + return (new EconomyResource($response)) + ->response() + ->setStatusCode(Response::HTTP_OK); } catch (\Exception $ex) { return $this->errorResponse(false, $ex->getMessage(), Response::HTTP_INTERNAL_SERVER_ERROR); } } - public function accumulatedEconomy(Request $request): JsonResponse + public function grossMonthlyEconomy(Request $request): JsonResponse { try { - $this->economyContract->getAccumulatedEconomy($request->all()); + $response = $this->economyContract->getGrossMonthlyEconomy($request->all()); + return (new EconomyResource($response)) + ->response() + ->setStatusCode(Response::HTTP_OK); } catch (\Exception $ex) { return $this->errorResponse(false, $ex->getMessage(), Response::HTTP_INTERNAL_SERVER_ERROR); } } - public function costEstimatesEconomy(Request $request): JsonResponse + public function captiveMonthlyEconomy(Request $request): JsonResponse { try { - $this->economyContract->getCostEstimatesEconomy($request->all()); + $response = $this->economyContract->getCaptiveMonthlyEconomy($request->all()); + return (new EconomyResource($response)) + ->response() + ->setStatusCode(Response::HTTP_OK); } catch (\Exception $ex) { return $this->errorResponse(false, $ex->getMessage(), Response::HTTP_INTERNAL_SERVER_ERROR); } @@ -53,45 +75,13 @@ class EconomyController extends Controller { try { $response = $this->economyContract->getCostMWhEconomy($request->all()); - return $this->successResponse($response); + return (new EconomyResource($response)) + ->response() + ->setStatusCode(Response::HTTP_OK); } catch (\Exception $ex) { return $this->errorResponse(false, $ex->getMessage(), Response::HTTP_INTERNAL_SERVER_ERROR); } } - public function __invoke(Request $request) - { - try { - $this->economyContract->execute($request); - } catch (\Exception $exception) { - return \response()->json([], ResponseAlias::HTTP_INTERNAL_SERVER_ERROR); - } - - } - -// public function index(): JsonResponse -// { -// -// Economy::query()->select(); -// abort_if(Gate::denies('teste-index'), ResponseAlias::HTTP_FORBIDDEN, '403 Forbidden'); -// -// $result = DadosCadastrais::query()->limit(10)->get(); -// -// return response()->json($result, 200); -// -// } -// -// -// public function teste(Request $request): JsonResponse -// { -// try { -// $data = (new EconomyRepository())->execute($request->all()); -// return \response()->json($data, ResponseAlias::HTTP_OK); -// } catch (\Exception $exception) { -// return \response()->json([], ResponseAlias::HTTP_INTERNAL_SERVER_ERROR); -// } -// -// } - } diff --git a/app/Http/Controllers/FaqController.php b/app/Http/Controllers/FaqController.php index 0e0c035..a32f359 100644 --- a/app/Http/Controllers/FaqController.php +++ b/app/Http/Controllers/FaqController.php @@ -1,11 +1,15 @@ faq->all(); - return response()->json($response, 200); + return (new FaqResource($response)) + ->response() + ->setStatusCode(Response::HTTP_OK); } catch (\Exception $ex) { - return $this->errorResponse(false, $ex->getMessage(), 404); + return $this->errorResponse(false, $ex->getMessage(), Response::HTTP_INTERNAL_SERVER_ERROR); } } @@ -29,9 +35,11 @@ class FaqController extends Controller { try { $response = $this->faq->create($notificationRequest->all()); - return response()->json($response, 200); + return (new FaqResource($response)) + ->response() + ->setStatusCode(Response::HTTP_CREATED); } catch (\Exception $ex) { - return $this->errorResponse(false, $ex->getMessage(), 404); + return $this->errorResponse(false, $ex->getMessage(), Response::HTTP_INTERNAL_SERVER_ERROR); } } @@ -39,9 +47,11 @@ class FaqController extends Controller { try { $response = $this->faq->find($id); - return response()->json($response, 200); + return (new FaqResource($response)) + ->response() + ->setStatusCode(Response::HTTP_OK); }catch (\Exception $ex){ - return $this->errorResponse(false, $ex->getMessage(), 404); + return $this->errorResponse(false, $ex->getMessage(), Response::HTTP_INTERNAL_SERVER_ERROR); } } @@ -49,9 +59,11 @@ class FaqController extends Controller { try { $response = $this->faq->update($request->all(), $id); - return response()->json($response, 200); + return (new FaqResource($response)) + ->response() + ->setStatusCode(Response::HTTP_ACCEPTED); }catch (\Exception $ex){ - return $this->errorResponse(false, $ex->getMessage(), 404); + return $this->errorResponse(false, $ex->getMessage(), Response::HTTP_INTERNAL_SERVER_ERROR); } } @@ -59,9 +71,9 @@ class FaqController extends Controller { try { $response = $this->faq->destroy($id); - return response()->json($response, 200); + return response()->json($response, Response::HTTP_NO_CONTENT); }catch (\Exception $ex){ - return $this->errorResponse(false, $ex->getMessage(), 404); + return $this->errorResponse(false, $ex->getMessage(), Response::HTTP_INTERNAL_SERVER_ERROR); } } diff --git a/app/Http/Controllers/NotificationController.php b/app/Http/Controllers/NotificationController.php index 350f42f..8fbc170 100644 --- a/app/Http/Controllers/NotificationController.php +++ b/app/Http/Controllers/NotificationController.php @@ -1,5 +1,7 @@ notification->all(); - return response()->json($response, 200); + return (new NotificationResource($response)) + ->response() + ->setStatusCode(Response::HTTP_OK); } catch (\Exception $ex) { - return $this->errorResponse(false, $ex->getMessage(), 404); + return $this->errorResponse(false, $ex->getMessage(), Response::HTTP_INTERNAL_SERVER_ERROR); } } @@ -38,7 +42,7 @@ class NotificationController extends Controller ->response() ->setStatusCode(Response::HTTP_CREATED); } catch (\Exception $ex) { - return $this->errorResponse(false, $ex->getMessage(), 404); + return $this->errorResponse(false, $ex->getMessage(), Response::HTTP_INTERNAL_SERVER_ERROR); } } @@ -46,9 +50,11 @@ class NotificationController extends Controller { try { $response = $this->notification->find($id); - return response()->json($response, 200); + return (new NotificationResource($response)) + ->response() + ->setStatusCode(Response::HTTP_OK); }catch (\Exception $ex){ - return $this->errorResponse(false, $ex->getMessage(), 404); + return $this->errorResponse(false, $ex->getMessage(), Response::HTTP_INTERNAL_SERVER_ERROR); } } @@ -56,9 +62,11 @@ class NotificationController extends Controller { try { $response = $this->notification->update($request->all(), $id); - return response()->json($response, 200); + return (new NotificationResource($response)) + ->response() + ->setStatusCode(Response::HTTP_ACCEPTED); }catch (\Exception $ex){ - return $this->errorResponse(false, $ex->getMessage(), 404); + return $this->errorResponse(false, $ex->getMessage(), Response::HTTP_INTERNAL_SERVER_ERROR); } } @@ -66,9 +74,9 @@ class NotificationController extends Controller { try { $response = $this->notification->destroy($id); - return response()->json($response, 200); + return response()->json($response, Response::HTTP_NO_CONTENT); }catch (\Exception $ex){ - return $this->errorResponse(false, $ex->getMessage(), 404); + return $this->errorResponse(false, $ex->getMessage(), Response::HTTP_INTERNAL_SERVER_ERROR); } } } \ No newline at end of file diff --git a/app/Http/Controllers/OperationController.php b/app/Http/Controllers/OperationSummaryController.php similarity index 91% rename from app/Http/Controllers/OperationController.php rename to app/Http/Controllers/OperationSummaryController.php index 94f465b..c4e4fa3 100644 --- a/app/Http/Controllers/OperationController.php +++ b/app/Http/Controllers/OperationSummaryController.php @@ -1,5 +1,7 @@ pldContract->getOverviewByRegion(); - return (new OverviewResource($response)) + return (new PldResource($response)) ->response() ->setStatusCode(Response::HTTP_OK); }catch (\Exception $ex){ - return $this->errorResponse(false, $ex->getMessage(), 404); + return $this->errorResponse(false, $ex->getMessage(), Response::HTTP_INTERNAL_SERVER_ERROR); } } @@ -33,9 +35,11 @@ class PldController extends Controller { try { $response = $this->pldContract->getListConsumption($request->all()); - return response()->json($response, 200); + return (new PldResource($response)) + ->response() + ->setStatusCode(Response::HTTP_OK); }catch (\Exception $ex){ - return $this->errorResponse(false, $ex->getMessage(), 404); + return $this->errorResponse(false, $ex->getMessage(), Response::HTTP_INTERNAL_SERVER_ERROR); } } @@ -43,9 +47,11 @@ class PldController extends Controller { try { $response = $this->pldContract->getConsumptionByDaily($request->all()); - return response()->json($response, 200); + return (new PldResource($response)) + ->response() + ->setStatusCode(Response::HTTP_OK); }catch (\Exception $ex){ - return $this->errorResponse(false, $ex->getMessage(), 404); + return $this->errorResponse(false, $ex->getMessage(), Response::HTTP_INTERNAL_SERVER_ERROR); } } @@ -53,9 +59,11 @@ class PldController extends Controller { try { $response = $this->pldContract->getConsumptionBySchedule($request->all()); - return response()->json($response, 200); + return (new PldResource($response)) + ->response() + ->setStatusCode(Response::HTTP_OK); }catch (\Exception $ex){ - return $this->errorResponse(false, $ex->getMessage(), 404); + return $this->errorResponse(false, $ex->getMessage(), Response::HTTP_INTERNAL_SERVER_ERROR); } } } diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index d5aad81..0c23c24 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -28,10 +28,12 @@ class UserController extends Controller public function index(): JsonResponse { try { - $list = $this->user->withRelationsByAll('roles'); - return response()->json($list, 200); + $response = $this->user->withRelationsByAll('roles'); + return (new UserResource($response)) + ->response() + ->setStatusCode(Response::HTTP_OK); }catch (\Exception $ex){ - return $this->errorResponse(false, $ex->getMessage(), 404); + return $this->errorResponse(false, $ex->getMessage(), Response::HTTP_INTERNAL_SERVER_ERROR); } } @@ -46,12 +48,11 @@ class UserController extends Controller { try { $response = $this->user->create($request->all()); - return (new UserResource($response)) ->response() ->setStatusCode(Response::HTTP_CREATED); }catch (\Exception $ex){ - return $this->errorResponse(false, $ex->getMessage(), 404); + return $this->errorResponse(false, $ex->getMessage(), Response::HTTP_INTERNAL_SERVER_ERROR); } } @@ -65,9 +66,11 @@ class UserController extends Controller { try { $response = $this->user->find($id); - return response()->json($response, 200); + return (new UserResource($response)) + ->response() + ->setStatusCode(Response::HTTP_OK); }catch (\Exception $ex){ - return $this->errorResponse(false, $ex->getMessage(), 404); + return $this->errorResponse(false, $ex->getMessage(), Response::HTTP_INTERNAL_SERVER_ERROR); } } @@ -82,9 +85,11 @@ class UserController extends Controller { try { $response = $this->user->update($request->all(), $id); - return response()->json($response, 200); + return (new UserResource($response)) + ->response() + ->setStatusCode(Response::HTTP_ACCEPTED); }catch (\Exception $ex){ - return $this->errorResponse(false, $ex->getMessage(), 404); + return $this->errorResponse(false, $ex->getMessage(), Response::HTTP_INTERNAL_SERVER_ERROR); } } @@ -98,9 +103,9 @@ class UserController extends Controller { try { $response = $this->user->destroy($id); - return response()->json($response, 200); + return response()->json($response, Response::HTTP_NO_CONTENT); }catch (\Exception $ex){ - return $this->errorResponse(false, $ex->getMessage(), 404); + return $this->errorResponse(false, $ex->getMessage(), Response::HTTP_INTERNAL_SERVER_ERROR); } } } diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index c3be254..5857c4b 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -39,7 +39,7 @@ class Kernel extends HttpKernel ], 'api' => [ - // \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class, + \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class, 'throttle:api', \Illuminate\Routing\Middleware\SubstituteBindings::class, ], @@ -63,5 +63,7 @@ class Kernel extends HttpKernel 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, + 'abilities' => \Laravel\Sanctum\Http\Middleware\CheckAbilities::class, + 'ability' => \Laravel\Sanctum\Http\Middleware\CheckForAnyAbility::class, ]; } diff --git a/app/Http/Requests/AzuxRequest.php b/app/Http/Requests/AzuxRequest.php index 01e3c53..a425778 100644 --- a/app/Http/Requests/AzuxRequest.php +++ b/app/Http/Requests/AzuxRequest.php @@ -10,8 +10,8 @@ namespace App\Http\Requests; use Exception; use Illuminate\Http\Request; -use App\Helper\Model\filter\FieldFilterBuilder; -use App\Helper\Model\filter\FilterBuilder; +use App\Helpers\Model\filter\FieldFilterBuilder; +use App\Helpers\Model\filter\FilterBuilder; /** * Description of AzuxRequest diff --git a/app/Http/Resources/EconomyResource.php b/app/Http/Resources/EconomyResource.php new file mode 100644 index 0000000..08c44b1 --- /dev/null +++ b/app/Http/Resources/EconomyResource.php @@ -0,0 +1,19 @@ +format('d/m/Y H:i:s'); } + protected static function booted() + { + static::addGlobalScope(new UserScope()); + } + } diff --git a/app/Models/Economy.php b/app/Models/Economy.php index 2d7592a..d4024df 100644 --- a/app/Models/Economy.php +++ b/app/Models/Economy.php @@ -2,6 +2,7 @@ namespace App\Models; +use App\Models\Scopes\UserScope; use DateTimeInterface; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; @@ -33,7 +34,6 @@ class Economy extends Model implements Auditing protected $hidden = [ 'updated_at', - 'created_at', 'deleted_at', ]; @@ -42,4 +42,9 @@ class Economy extends Model implements Auditing return $date->format('d/m/Y H:i:s'); } + protected static function booted() + { + static::addGlobalScope(new UserScope()); + } + } diff --git a/app/Models/Faq.php b/app/Models/Faq.php index 9bd9a99..a13701b 100644 --- a/app/Models/Faq.php +++ b/app/Models/Faq.php @@ -27,7 +27,6 @@ class Faq extends Model implements Auditing protected $hidden = [ 'updated_at', - 'created_at', 'deleted_at', ]; diff --git a/app/Models/Notifications.php b/app/Models/Notifications.php index f3456e1..a429c21 100644 --- a/app/Models/Notifications.php +++ b/app/Models/Notifications.php @@ -23,7 +23,6 @@ class Notifications extends Model protected $hidden = [ 'updated_at', - 'created_at', 'deleted_at', ]; diff --git a/app/Models/Pld.php b/app/Models/Pld.php index d93c12d..c1578ea 100644 --- a/app/Models/Pld.php +++ b/app/Models/Pld.php @@ -32,7 +32,6 @@ class Pld extends Model implements Auditing protected $hidden = [ 'updated_at', - 'created_at', 'deleted_at', ]; diff --git a/app/Models/Role.php b/app/Models/Role.php index b9b37c4..9e59b2c 100644 --- a/app/Models/Role.php +++ b/app/Models/Role.php @@ -29,6 +29,11 @@ class Role extends Model implements Auditing 'deleted_at', ]; + protected $hidden = [ + 'updated_at', + 'deleted_at', + ]; + protected function serializeDate(DateTimeInterface $date): string { return $date->format('d/m/Y H:i:s'); diff --git a/app/Models/Scopes/UserScope.php b/app/Models/Scopes/UserScope.php new file mode 100644 index 0000000..0c73ac3 --- /dev/null +++ b/app/Models/Scopes/UserScope.php @@ -0,0 +1,33 @@ +client_id)) { + $builder->join( + "dados_cadastrais", + "dados_cadastrais.cod_smart_unidade", + "=", + $model->qualifyColumn("cod_smart_unidade"), + )->where('dados_cadastrais.cod_smart_cliente', '=', $user->client_id); + } + } + +} diff --git a/app/Models/User.php b/app/Models/User.php index c5defe3..e7fadd3 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -32,7 +32,6 @@ class User extends Authenticatable implements Auditing protected $hidden = [ 'password', 'remember_token', - 'created_at', 'updated_at', 'deleted_at', ]; diff --git a/app/Repositories/ContractInterface.php b/app/Repositories/ContractInterface.php index f0ef004..0478622 100644 --- a/app/Repositories/ContractInterface.php +++ b/app/Repositories/ContractInterface.php @@ -10,4 +10,5 @@ interface ContractInterface public function update(array $params, $id); public function destroy($id); public function withRelationsByAll($relations); + public function selectGlobal($params); } diff --git a/app/Repositories/DadosTe/DadosTeRepository.php b/app/Repositories/DadosTe/DadosTeRepository.php index baec250..329485b 100644 --- a/app/Repositories/DadosTe/DadosTeRepository.php +++ b/app/Repositories/DadosTe/DadosTeRepository.php @@ -9,6 +9,7 @@ use App\Repositories\AbstractRepository; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Collection; use Illuminate\Support\Arr; +use Illuminate\Support\Facades\DB; class DadosTeRepository extends AbstractRepository implements DadosTeContractInterface @@ -23,7 +24,7 @@ class DadosTeRepository extends AbstractRepository implements DadosTeContractInt { $query = $this->model ->select( - 'dados_te.mes', + DB::raw("TO_CHAR(TO_DATE(dados_te.mes, 'YYMM'), 'MM/YYYY') as mes"), 'dados_te.cod_smart_unidade', 'dados_te.operacao', 'dados_te.tipo', @@ -31,12 +32,6 @@ class DadosTeRepository extends AbstractRepository implements DadosTeContractInt 'dados_te.montante_nf', 'dados_te.preco_nf', 'dados_te.nf_c_icms' - ) - ->join( - "dados_cadastrais", - "dados_cadastrais.cod_smart_unidade", - "=", - "dados_te.cod_smart_unidade" ); if (!empty($params)) { diff --git a/app/Repositories/Economy/EconomyContractInterface.php b/app/Repositories/Economy/EconomyContractInterface.php index 8b4d79e..1213907 100644 --- a/app/Repositories/Economy/EconomyContractInterface.php +++ b/app/Repositories/Economy/EconomyContractInterface.php @@ -6,10 +6,9 @@ use App\Repositories\ContractInterface; interface EconomyContractInterface extends ContractInterface { - - public function getGrossEconomy($params); - public function getAccumulatedEconomy($params); - public function getCostEstimatesEconomy($params); + public function getGrossAnnualEconomy($params); + public function getGrossMonthlyEconomy($params); + public function getCaptiveMonthlyEconomy($params); public function getCostMWhEconomy($params); diff --git a/app/Repositories/Economy/EconomyRepository.php b/app/Repositories/Economy/EconomyRepository.php index 16a0918..da08c07 100644 --- a/app/Repositories/Economy/EconomyRepository.php +++ b/app/Repositories/Economy/EconomyRepository.php @@ -21,16 +21,7 @@ class EconomyRepository extends AbstractRepository implements EconomyContractInt public function execute($params, $field): Builder { - $query = $this->model - ->select( - $field - ) - ->join( - "dados_cadastrais", - "dados_cadastrais.cod_smart_unidade", - "=", - "economia.cod_smart_unidade", - ); + $query = $this->model->select($field); if (!empty($params)) { $query = static::getFilterBuilder($params)->applyFilter($query); @@ -38,7 +29,24 @@ class EconomyRepository extends AbstractRepository implements EconomyContractInt return $query; } - public function getGrossEconomy($params): Collection|array + public function getGrossAnnualEconomy($params): Collection|array + { + $field = [ + DB::raw("TO_CHAR(TO_DATE(economia.mes, 'YYMM'), 'YYYY') as ano"), + DB::raw("SUM(economia.economia_acumulada) as economia_acumulada"), + DB::raw("(SUM(economia.economia_mensal)/SUM(economia.custo_livre)) as econ_percentual"), + "economia.dad_estimado" + ]; + + return $this->execute($params, $field) + ->where(DB::raw("TO_DATE(economia.mes, 'YYMM')"), + ">=", + DB::raw("TO_DATE(TO_CHAR(current_date , 'YYYY-01-01'), 'YYYY-MM-DD') - interval '1' year")) + ->groupBy(['mes', 'dad_estimado']) + ->get(); + } + + public function getGrossMonthlyEconomy($params) { $field = [ DB::raw("TO_CHAR(TO_DATE(economia.mes, 'YYMM'), 'MM/YYYY') as mes"), @@ -48,21 +56,33 @@ class EconomyRepository extends AbstractRepository implements EconomyContractInt ]; return $this->execute($params, $field) - ->where(DB::raw("TO_DATE(economia.mes, 'YYMM')"), - ">=", - DB::raw("TO_DATE(TO_CHAR(current_date , 'YYYY-01-01'), 'YYYY-MM-DD') - interval '1' year")) + ->where(DB::raw("TO_DATE(economia.mes, 'YYMM')"), + ">=", + DB::raw("TO_DATE(TO_CHAR(current_date , 'YYYY-01-01'), 'YYYY-MM-DD') - interval '1' year")) ->groupBy(['mes', 'dad_estimado']) ->get(); } - public function getAccumulatedEconomy($params) + public function getCaptiveMonthlyEconomy($params) { - // TODO: Implement getAccumulatedEconomy() method. - } + $field = [ + DB::raw("TO_CHAR(TO_DATE(economia.mes, 'YYMM'), 'MM/YYYY') as mes"), + DB::raw("SUM(economia.custo_cativo) as custo_cativo"), + DB::raw("SUM(economia.custo_livre) as custo_livre"), + DB::raw("SUM(economia.economia_mensal) as economia_mensal"), + DB::raw("(SUM(economia_mensal)/SUM(custo_livre)) as econ_percentual"), + "economia.dad_estimado" + ]; - public function getCostEstimatesEconomy($params) - { - // TODO: Implement getCostEstimatesEconomy() method. + return $this->execute($params, $field) + ->whereBetween( + DB::raw("TO_DATE(economia.mes, 'YYMM')"), + [ + DB::raw("TO_DATE(TO_CHAR(current_date , 'YYYY-01-01'), 'YYYY-MM-DD') - interval '1' year"), + DB::raw("TO_DATE(TO_CHAR(current_date, 'YYYY-12-31'), 'YYYY-MM-DD') ") + ]) + ->groupBy(['mes', 'dad_estimado']) + ->get(); } public function getCostMWhEconomy($params) @@ -74,12 +94,12 @@ class EconomyRepository extends AbstractRepository implements EconomyContractInt ]; return $this->execute($params, $field) - ->whereBetween(DB::raw("TO_DATE(economia.mes, 'YYMM')"), - [ - DB::raw("TO_DATE(TO_CHAR(current_date , 'YYYY-01-01'), 'YYYY-MM-DD') - interval '1' year"), - DB::raw("TO_DATE(TO_CHAR(current_date, 'YYYY-12-31'), 'YYYY-MM-DD') ") - ] - ) + ->whereBetween( + DB::raw("TO_DATE(economia.mes, 'YYMM')"), + [ + DB::raw("TO_DATE(TO_CHAR(current_date , 'YYYY-01-01'), 'YYYY-MM-DD') - interval '1' year"), + DB::raw("TO_DATE(TO_CHAR(current_date, 'YYYY-12-31'), 'YYYY-MM-DD') ") + ]) ->groupBy(['mes', 'dad_estimado']) ->get(); @@ -89,9 +109,7 @@ class EconomyRepository extends AbstractRepository implements EconomyContractInt protected function where($query) { return $query->where( - DB::raw( - - ) + DB::raw() ); } diff --git a/app/Repositories/MethodsTrait.php b/app/Repositories/MethodsTrait.php index 399a373..fa300a1 100644 --- a/app/Repositories/MethodsTrait.php +++ b/app/Repositories/MethodsTrait.php @@ -37,4 +37,15 @@ trait MethodsTrait { return $this->model->with($relations)->get(); } + + public function selectGlobal($params) + { + $filter = static::getFilterBuilder($params); + + $query = $this->model->select($filter->getFields()); + + $result = $filter->applyFilter($query)->get(); + + dd($result); + } } \ No newline at end of file diff --git a/app/Repository/AbstractRepository.php b/app/Repository/AbstractRepository.php deleted file mode 100644 index 654c152..0000000 --- a/app/Repository/AbstractRepository.php +++ /dev/null @@ -1,67 +0,0 @@ -model = $this->resolveModel(); - } - - public function getJsonObject($json, $className) - { - try { - $jsonData = json_decode(json_encode($json), false); - - $obj = new $className; - - if (!isset($jsonData) && method_exists($obj, 'jsonToObject')) - { - throw new Exception("Request inválido"); - } - - $obj->jsonSetObject($jsonData); - - return $obj; - - } catch (Exception $ex) { - return $ex->getMessage(); - } - } - - public function __get($name) - { - return $this->model->{$name}; - } - - /** - * @throws BindingResolutionException - * @throws Exception - */ - protected function resolveModel(): Model - { - $model = app()->make($this->model()); - - if (!$model instanceof Model) { - throw new Exception( - "Class {$this->model()} must be an instance of Illuminate\\Database\\Eloquent\\Model" - ); - } - return $model; - } - -} diff --git a/app/Repository/Economy/EconomyRepository.php b/app/Repository/Economy/EconomyRepository.php deleted file mode 100644 index db0c564..0000000 --- a/app/Repository/Economy/EconomyRepository.php +++ /dev/null @@ -1,56 +0,0 @@ -getFilterBuilder($params); - - foreach ($filter->getFilters() as $filters) - { - if (!$filters->getRow()) - { - continue; - } - $filters->setField(DB::raw("TO_CHAR(TO_DATE(economia.mes, 'YYMM'), 'MM/YYYY')")); - } - - $field = collect($filter->getFields())->merge($this->getRowField())->all(); - - $query = $this->model->newQuery() - ->select($field) - ->join( - "dados_cadastrais", - "dados_cadastrais.cod_smart_unidade", - "=", - "economia.cod_smart_unidade", - ); - - $res = $filter->applyFilter($query); - - return $res->paginate(); - - } - - public function getRowField(): array - { - return [ - DB::raw("TO_CHAR(TO_DATE(economia.mes, 'YYMM'), 'MM/YYYY') as mes"), - DB::raw("TRIM(TO_CHAR(economia.custo_cativo, '99999999.99')) as custo_cativo"), - DB::raw("TRIM(TO_CHAR(economia.custo_livre, '99999999.99')) as custo_livre"), - DB::raw("COALESCE(economia.economia_mensal / NULLIF(economia.custo_livre, 0), 0) as custo") - ]; - } - - protected function model(): string - { - return Economy::class; - } -} diff --git a/app/Repository/Med5min/Med5minRepository.php b/app/Repository/Med5min/Med5minRepository.php deleted file mode 100644 index 467f779..0000000 --- a/app/Repository/Med5min/Med5minRepository.php +++ /dev/null @@ -1,20 +0,0 @@ -model->all(); - } - - public function create(array $params) - { - return $this->model->create($params); - } - - public function find(int $id) - { - // TODO: Implement find() method. - } - - public function update(array $params, int $id) - { - return $this->model->find($id)->update( $params); - } - - public function delete(int $id) - { - // TODO: Implement delete() method. - } - - public function getFilterBuilder($json): ?FilterBuilder - { - return $this->getJsonObject($json, FilterBuilder::class); - } - - - static function logQuery($query, $type = 'get') - { - DB::enableQueryLog(); - $query->$type(); - dd(DB::getQueryLog()); - } - - -} diff --git a/app/Support/FilterBuilder/FilterType.php b/app/Support/FilterBuilder/FilterType.php index ad4339f..70403e6 100644 --- a/app/Support/FilterBuilder/FilterType.php +++ b/app/Support/FilterBuilder/FilterType.php @@ -41,6 +41,10 @@ class FilterType return static::makeWhereFilter($builder, $filter); } + if (in_array($filter->getType(), self::IN_FILTER)) { + return static::makeInFilter($builder, $filter); + } + if (in_array($filter->getType(), self::BETWEEN_FILTER)) { return static::makeBetweenFilter($builder, $filter); } @@ -55,13 +59,22 @@ class FilterType if ($fType === 'not_like') { $fType = 'not like'; } - $field = ($filter->getRow()) ? DB::raw($filter->getField()) : $filter->getField(); - return $builder->where($field, $fType, $filter->getValue()); } + private static function makeInFilter(Builder $builder, FilterItem $filter) : Builder + { + if ($filter->getType() === "in") { + return $builder->whereIn($filter->getField(), $filter->getValue()); + } elseif ($filter->getType() === "not_in") { + return $builder->whereNotIn($filter->getField(), $filter->getValue()); + } + + return $builder; + } + private static function makeBetweenFilter(Builder $builder, FilterItem $filter): Builder { if ($filter->getType() === "between") { diff --git a/composer.json b/composer.json index b1e4cfb..369519b 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,10 @@ "App\\": "app/", "Database\\Factories\\": "database/factories/", "Database\\Seeders\\": "database/seeders/" - } + }, + "files": [ + "app/Helpers/CustomHelpers.php" + ] }, "autoload-dev": { "psr-4": { diff --git a/composer.lock b/composer.lock index 618e1c8..f6618e8 100644 --- a/composer.lock +++ b/composer.lock @@ -143,16 +143,16 @@ }, { "name": "doctrine/cache", - "version": "2.1.1", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "331b4d5dbaeab3827976273e9356b3b453c300ce" + "reference": "1ca8f21980e770095a31456042471a57bc4c68fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/331b4d5dbaeab3827976273e9356b3b453c300ce", - "reference": "331b4d5dbaeab3827976273e9356b3b453c300ce", + "url": "https://api.github.com/repos/doctrine/cache/zipball/1ca8f21980e770095a31456042471a57bc4c68fb", + "reference": "1ca8f21980e770095a31456042471a57bc4c68fb", "shasum": "" }, "require": { @@ -162,18 +162,12 @@ "doctrine/common": ">2.2,<2.4" }, "require-dev": { - "alcaeus/mongo-php-adapter": "^1.1", "cache/integration-tests": "dev-master", - "doctrine/coding-standard": "^8.0", - "mongodb/mongodb": "^1.1", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", - "predis/predis": "~1.0", + "doctrine/coding-standard": "^9", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", "psr/cache": "^1.0 || ^2.0 || ^3.0", - "symfony/cache": "^4.4 || ^5.2 || ^6.0@dev", - "symfony/var-exporter": "^4.4 || ^5.2 || ^6.0@dev" - }, - "suggest": { - "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" + "symfony/cache": "^4.4 || ^5.4 || ^6", + "symfony/var-exporter": "^4.4 || ^5.4 || ^6" }, "type": "library", "autoload": { @@ -222,7 +216,7 @@ ], "support": { "issues": "https://github.com/doctrine/cache/issues", - "source": "https://github.com/doctrine/cache/tree/2.1.1" + "source": "https://github.com/doctrine/cache/tree/2.2.0" }, "funding": [ { @@ -238,7 +232,7 @@ "type": "tidelift" } ], - "time": "2021-07-17T14:49:29+00:00" + "time": "2022-05-20T20:07:39+00:00" }, { "name": "doctrine/dbal", @@ -718,16 +712,16 @@ }, { "name": "egulias/email-validator", - "version": "3.1.2", + "version": "3.2", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "ee0db30118f661fb166bcffbf5d82032df484697" + "reference": "a5ed8d58ed0c340a7c2109f587951b1c84cf6286" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ee0db30118f661fb166bcffbf5d82032df484697", - "reference": "ee0db30118f661fb166bcffbf5d82032df484697", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/a5ed8d58ed0c340a7c2109f587951b1c84cf6286", + "reference": "a5ed8d58ed0c340a7c2109f587951b1c84cf6286", "shasum": "" }, "require": { @@ -774,7 +768,7 @@ ], "support": { "issues": "https://github.com/egulias/EmailValidator/issues", - "source": "https://github.com/egulias/EmailValidator/tree/3.1.2" + "source": "https://github.com/egulias/EmailValidator/tree/3.2" }, "funding": [ { @@ -782,7 +776,7 @@ "type": "github" } ], - "time": "2021-10-11T09:18:27+00:00" + "time": "2022-05-28T22:19:18+00:00" }, { "name": "fruitcake/php-cors", @@ -919,16 +913,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.4.2", + "version": "7.4.4", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4" + "reference": "e3ff079b22820c2029d4c2a87796b6a0b8716ad8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ac1ec1cd9b5624694c3a40be801d94137afb12b4", - "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/e3ff079b22820c2029d4c2a87796b6a0b8716ad8", + "reference": "e3ff079b22820c2029d4c2a87796b6a0b8716ad8", "shasum": "" }, "require": { @@ -1023,7 +1017,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.4.2" + "source": "https://github.com/guzzle/guzzle/tree/7.4.4" }, "funding": [ { @@ -1039,7 +1033,7 @@ "type": "tidelift" } ], - "time": "2022-03-20T14:16:28+00:00" + "time": "2022-06-09T21:39:15+00:00" }, { "name": "guzzlehttp/promises", @@ -1127,16 +1121,16 @@ }, { "name": "guzzlehttp/psr7", - "version": "2.2.1", + "version": "2.3.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2" + "reference": "83260bb50b8fc753c72d14dc1621a2dac31877ee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/c94a94f120803a18554c1805ef2e539f8285f9a2", - "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/83260bb50b8fc753c72d14dc1621a2dac31877ee", + "reference": "83260bb50b8fc753c72d14dc1621a2dac31877ee", "shasum": "" }, "require": { @@ -1160,7 +1154,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2-dev" + "dev-master": "2.3-dev" } }, "autoload": { @@ -1222,7 +1216,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.2.1" + "source": "https://github.com/guzzle/psr7/tree/2.3.0" }, "funding": [ { @@ -1238,20 +1232,20 @@ "type": "tidelift" } ], - "time": "2022-03-20T21:55:58+00:00" + "time": "2022-06-09T08:26:02+00:00" }, { "name": "laravel/framework", - "version": "v9.12.2", + "version": "v9.17.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "b5b5c635f1a93f277b5248725a1f7ffc97e20810" + "reference": "091e287678ac723c591509ca6374e4ded4a99b1c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/b5b5c635f1a93f277b5248725a1f7ffc97e20810", - "reference": "b5b5c635f1a93f277b5248725a1f7ffc97e20810", + "url": "https://api.github.com/repos/laravel/framework/zipball/091e287678ac723c591509ca6374e4ded4a99b1c", + "reference": "091e287678ac723c591509ca6374e4ded4a99b1c", "shasum": "" }, "require": { @@ -1417,7 +1411,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2022-05-11T13:38:26+00:00" + "time": "2022-06-07T15:09:32+00:00" }, { "name": "laravel/sanctum", @@ -1486,16 +1480,16 @@ }, { "name": "laravel/serializable-closure", - "version": "v1.1.1", + "version": "v1.2.0", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "9e4b005daa20b0c161f3845040046dc9ddc1d74e" + "reference": "09f0e9fb61829f628205b7c94906c28740ff9540" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/9e4b005daa20b0c161f3845040046dc9ddc1d74e", - "reference": "9e4b005daa20b0c161f3845040046dc9ddc1d74e", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/09f0e9fb61829f628205b7c94906c28740ff9540", + "reference": "09f0e9fb61829f628205b7c94906c28740ff9540", "shasum": "" }, "require": { @@ -1541,7 +1535,7 @@ "issues": "https://github.com/laravel/serializable-closure/issues", "source": "https://github.com/laravel/serializable-closure" }, - "time": "2022-02-11T19:23:53+00:00" + "time": "2022-05-16T17:09:47+00:00" }, { "name": "laravel/tinker", @@ -1613,16 +1607,16 @@ }, { "name": "league/commonmark", - "version": "2.3.0", + "version": "2.3.3", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "32a49eb2b38fe5e5c417ab748a45d0beaab97955" + "reference": "0da1dca5781dd3cfddbe328224d9a7a62571addc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/32a49eb2b38fe5e5c417ab748a45d0beaab97955", - "reference": "32a49eb2b38fe5e5c417ab748a45d0beaab97955", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/0da1dca5781dd3cfddbe328224d9a7a62571addc", + "reference": "0da1dca5781dd3cfddbe328224d9a7a62571addc", "shasum": "" }, "require": { @@ -1715,7 +1709,7 @@ "type": "tidelift" } ], - "time": "2022-04-07T22:37:05+00:00" + "time": "2022-06-07T21:28:26+00:00" }, { "name": "league/config", @@ -1801,16 +1795,16 @@ }, { "name": "league/flysystem", - "version": "3.0.19", + "version": "3.0.21", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "670df21225d68d165a8df38587ac3f41caf608f8" + "reference": "8f1fcf9d2304ff77a006aa36dd2cb5f236999b12" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/670df21225d68d165a8df38587ac3f41caf608f8", - "reference": "670df21225d68d165a8df38587ac3f41caf608f8", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/8f1fcf9d2304ff77a006aa36dd2cb5f236999b12", + "reference": "8f1fcf9d2304ff77a006aa36dd2cb5f236999b12", "shasum": "" }, "require": { @@ -1871,7 +1865,7 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/3.0.19" + "source": "https://github.com/thephpleague/flysystem/tree/3.0.21" }, "funding": [ { @@ -1887,7 +1881,7 @@ "type": "tidelift" } ], - "time": "2022-05-03T21:19:02+00:00" + "time": "2022-06-12T17:54:28+00:00" }, { "name": "league/mime-type-detection", @@ -1947,16 +1941,16 @@ }, { "name": "monolog/monolog", - "version": "2.6.0", + "version": "2.7.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "247918972acd74356b0a91dfaa5adcaec069b6c0" + "reference": "5579edf28aee1190a798bfa5be8bc16c563bd524" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/247918972acd74356b0a91dfaa5adcaec069b6c0", - "reference": "247918972acd74356b0a91dfaa5adcaec069b6c0", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/5579edf28aee1190a798bfa5be8bc16c563bd524", + "reference": "5579edf28aee1190a798bfa5be8bc16c563bd524", "shasum": "" }, "require": { @@ -2035,7 +2029,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.6.0" + "source": "https://github.com/Seldaek/monolog/tree/2.7.0" }, "funding": [ { @@ -2047,7 +2041,7 @@ "type": "tidelift" } ], - "time": "2022-05-10T09:36:00+00:00" + "time": "2022-06-09T08:59:12+00:00" }, { "name": "nesbot/carbon", @@ -2295,16 +2289,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.13.2", + "version": "v4.14.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077" + "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1", + "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1", "shasum": "" }, "require": { @@ -2345,9 +2339,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.14.0" }, - "time": "2021-11-30T19:35:32+00:00" + "time": "2022-05-31T20:59:12+00:00" }, { "name": "owen-it/laravel-auditing", @@ -2923,16 +2917,16 @@ }, { "name": "psy/psysh", - "version": "v0.11.4", + "version": "v0.11.5", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "05c544b339b112226ad14803e1e5b09a61957454" + "reference": "c23686f9c48ca202710dbb967df8385a952a2daf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/05c544b339b112226ad14803e1e5b09a61957454", - "reference": "05c544b339b112226ad14803e1e5b09a61957454", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/c23686f9c48ca202710dbb967df8385a952a2daf", + "reference": "c23686f9c48ca202710dbb967df8385a952a2daf", "shasum": "" }, "require": { @@ -2993,9 +2987,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.11.4" + "source": "https://github.com/bobthecow/psysh/tree/v0.11.5" }, - "time": "2022-05-06T12:49:14+00:00" + "time": "2022-05-27T18:03:49+00:00" }, { "name": "ralouphie/getallheaders", @@ -3216,20 +3210,21 @@ }, { "name": "symfony/console", - "version": "v6.0.8", + "version": "v6.1.1", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "0d00aa289215353aa8746a31d101f8e60826285c" + "reference": "6187424023fbffcd757789aeb517c9161b1eabee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/0d00aa289215353aa8746a31d101f8e60826285c", - "reference": "0d00aa289215353aa8746a31d101f8e60826285c", + "url": "https://api.github.com/repos/symfony/console/zipball/6187424023fbffcd757789aeb517c9161b1eabee", + "reference": "6187424023fbffcd757789aeb517c9161b1eabee", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-mbstring": "~1.0", "symfony/service-contracts": "^1.1|^2|^3", "symfony/string": "^5.4|^6.0" @@ -3291,7 +3286,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.0.8" + "source": "https://github.com/symfony/console/tree/v6.1.1" }, "funding": [ { @@ -3307,24 +3302,24 @@ "type": "tidelift" } ], - "time": "2022-04-20T15:01:42+00:00" + "time": "2022-06-08T14:02:09+00:00" }, { "name": "symfony/css-selector", - "version": "v6.0.3", + "version": "v6.1.0", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "1955d595c12c111629cc814d3f2a2ff13580508a" + "reference": "05c40f02f621609404b8820ff8bc39acb46e19cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/1955d595c12c111629cc814d3f2a2ff13580508a", - "reference": "1955d595c12c111629cc814d3f2a2ff13580508a", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/05c40f02f621609404b8820ff8bc39acb46e19cf", + "reference": "05c40f02f621609404b8820ff8bc39acb46e19cf", "shasum": "" }, "require": { - "php": ">=8.0.2" + "php": ">=8.1" }, "type": "library", "autoload": { @@ -3356,7 +3351,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v6.0.3" + "source": "https://github.com/symfony/css-selector/tree/v6.1.0" }, "funding": [ { @@ -3372,29 +3367,29 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2022-02-25T11:15:52+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.0.1", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c" + "reference": "07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", - "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918", + "reference": "07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918", "shasum": "" }, "require": { - "php": ">=8.0.2" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.1-dev" }, "thanks": { "name": "symfony/contracts", @@ -3423,7 +3418,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.1" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.1.0" }, "funding": [ { @@ -3439,24 +3434,24 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2022-02-25T11:15:52+00:00" }, { "name": "symfony/error-handler", - "version": "v6.0.8", + "version": "v6.1.0", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "5e2795163acbd13b3cd46835c9f8f6c5d0a3a280" + "reference": "d02c662651e5de760bb7d5e94437113309e8f8a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/5e2795163acbd13b3cd46835c9f8f6c5d0a3a280", - "reference": "5e2795163acbd13b3cd46835c9f8f6c5d0a3a280", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/d02c662651e5de760bb7d5e94437113309e8f8a0", + "reference": "d02c662651e5de760bb7d5e94437113309e8f8a0", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "psr/log": "^1|^2|^3", "symfony/var-dumper": "^5.4|^6.0" }, @@ -3494,7 +3489,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v6.0.8" + "source": "https://github.com/symfony/error-handler/tree/v6.1.0" }, "funding": [ { @@ -3510,24 +3505,24 @@ "type": "tidelift" } ], - "time": "2022-04-12T16:11:42+00:00" + "time": "2022-05-23T10:32:57+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v6.0.3", + "version": "v6.1.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "6472ea2dd415e925b90ca82be64b8bc6157f3934" + "reference": "a0449a7ad7daa0f7c0acd508259f80544ab5a347" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/6472ea2dd415e925b90ca82be64b8bc6157f3934", - "reference": "6472ea2dd415e925b90ca82be64b8bc6157f3934", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a0449a7ad7daa0f7c0acd508259f80544ab5a347", + "reference": "a0449a7ad7daa0f7c0acd508259f80544ab5a347", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "symfony/event-dispatcher-contracts": "^2|^3" }, "conflict": { @@ -3577,7 +3572,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.0.3" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.1.0" }, "funding": [ { @@ -3593,24 +3588,24 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2022-05-05T16:51:07+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.0.1", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "7bc61cc2db649b4637d331240c5346dcc7708051" + "reference": "02ff5eea2f453731cfbc6bc215e456b781480448" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7bc61cc2db649b4637d331240c5346dcc7708051", - "reference": "7bc61cc2db649b4637d331240c5346dcc7708051", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/02ff5eea2f453731cfbc6bc215e456b781480448", + "reference": "02ff5eea2f453731cfbc6bc215e456b781480448", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "psr/event-dispatcher": "^1" }, "suggest": { @@ -3619,7 +3614,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.1-dev" }, "thanks": { "name": "symfony/contracts", @@ -3656,7 +3651,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.0.1" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.1.0" }, "funding": [ { @@ -3672,24 +3667,27 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2022-02-25T11:15:52+00:00" }, { "name": "symfony/finder", - "version": "v6.0.8", + "version": "v6.1.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "af7edab28d17caecd1f40a9219fc646ae751c21f" + "reference": "45b8beb69d6eb3b05a65689ebfd4222326773f8f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/af7edab28d17caecd1f40a9219fc646ae751c21f", - "reference": "af7edab28d17caecd1f40a9219fc646ae751c21f", + "url": "https://api.github.com/repos/symfony/finder/zipball/45b8beb69d6eb3b05a65689ebfd4222326773f8f", + "reference": "45b8beb69d6eb3b05a65689ebfd4222326773f8f", "shasum": "" }, "require": { - "php": ">=8.0.2" + "php": ">=8.1" + }, + "require-dev": { + "symfony/filesystem": "^6.0" }, "type": "library", "autoload": { @@ -3717,7 +3715,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.0.8" + "source": "https://github.com/symfony/finder/tree/v6.1.0" }, "funding": [ { @@ -3733,24 +3731,24 @@ "type": "tidelift" } ], - "time": "2022-04-15T08:07:58+00:00" + "time": "2022-04-15T08:08:08+00:00" }, { "name": "symfony/http-foundation", - "version": "v6.0.8", + "version": "v6.1.1", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "c9c86b02d7ef6f44f3154acc7de42831518afe7c" + "reference": "a58dc88d56e04e57993d96c1407a17407610e1df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/c9c86b02d7ef6f44f3154acc7de42831518afe7c", - "reference": "c9c86b02d7ef6f44f3154acc7de42831518afe7c", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/a58dc88d56e04e57993d96c1407a17407610e1df", + "reference": "a58dc88d56e04e57993d96c1407a17407610e1df", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-mbstring": "~1.1" }, @@ -3789,7 +3787,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.0.8" + "source": "https://github.com/symfony/http-foundation/tree/v6.1.1" }, "funding": [ { @@ -3805,26 +3803,26 @@ "type": "tidelift" } ], - "time": "2022-04-22T08:18:02+00:00" + "time": "2022-05-31T14:28:03+00:00" }, { "name": "symfony/http-kernel", - "version": "v6.0.8", + "version": "v6.1.1", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "7aaf1cdc9cc2ad47e926f624efcb679883a39ca7" + "reference": "86c4d6f6c5b6cd012df41e3b950c924b3ffdc019" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/7aaf1cdc9cc2ad47e926f624efcb679883a39ca7", - "reference": "7aaf1cdc9cc2ad47e926f624efcb679883a39ca7", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/86c4d6f6c5b6cd012df41e3b950c924b3ffdc019", + "reference": "86c4d6f6c5b6cd012df41e3b950c924b3ffdc019", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "psr/log": "^1|^2|^3", - "symfony/error-handler": "^5.4|^6.0", + "symfony/error-handler": "^6.1", "symfony/event-dispatcher": "^5.4|^6.0", "symfony/http-foundation": "^5.4|^6.0", "symfony/polyfill-ctype": "^1.8" @@ -3832,9 +3830,9 @@ "conflict": { "symfony/browser-kit": "<5.4", "symfony/cache": "<5.4", - "symfony/config": "<5.4", + "symfony/config": "<6.1", "symfony/console": "<5.4", - "symfony/dependency-injection": "<5.4", + "symfony/dependency-injection": "<6.1", "symfony/doctrine-bridge": "<5.4", "symfony/form": "<5.4", "symfony/http-client": "<5.4", @@ -3851,10 +3849,10 @@ "require-dev": { "psr/cache": "^1.0|^2.0|^3.0", "symfony/browser-kit": "^5.4|^6.0", - "symfony/config": "^5.4|^6.0", + "symfony/config": "^6.1", "symfony/console": "^5.4|^6.0", "symfony/css-selector": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", + "symfony/dependency-injection": "^6.1", "symfony/dom-crawler": "^5.4|^6.0", "symfony/expression-language": "^5.4|^6.0", "symfony/finder": "^5.4|^6.0", @@ -3864,6 +3862,7 @@ "symfony/stopwatch": "^5.4|^6.0", "symfony/translation": "^5.4|^6.0", "symfony/translation-contracts": "^1.1|^2|^3", + "symfony/uid": "^5.4|^6.0", "twig/twig": "^2.13|^3.0.4" }, "suggest": { @@ -3898,7 +3897,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v6.0.8" + "source": "https://github.com/symfony/http-kernel/tree/v6.1.1" }, "funding": [ { @@ -3914,25 +3913,25 @@ "type": "tidelift" } ], - "time": "2022-04-27T17:26:02+00:00" + "time": "2022-06-09T17:31:33+00:00" }, { "name": "symfony/mailer", - "version": "v6.0.8", + "version": "v6.1.1", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "706af6b3e99ebcbc639c9c664f5579aaa869409b" + "reference": "db6a19a5c896139901c2de59fc9849379e0ff3b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/706af6b3e99ebcbc639c9c664f5579aaa869409b", - "reference": "706af6b3e99ebcbc639c9c664f5579aaa869409b", + "url": "https://api.github.com/repos/symfony/mailer/zipball/db6a19a5c896139901c2de59fc9849379e0ff3b6", + "reference": "db6a19a5c896139901c2de59fc9849379e0ff3b6", "shasum": "" }, "require": { "egulias/email-validator": "^2.1.10|^3", - "php": ">=8.0.2", + "php": ">=8.1", "psr/event-dispatcher": "^1", "psr/log": "^1|^2|^3", "symfony/event-dispatcher": "^5.4|^6.0", @@ -3972,7 +3971,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v6.0.8" + "source": "https://github.com/symfony/mailer/tree/v6.1.1" }, "funding": [ { @@ -3988,24 +3987,24 @@ "type": "tidelift" } ], - "time": "2022-04-27T17:10:30+00:00" + "time": "2022-06-06T19:15:01+00:00" }, { "name": "symfony/mime", - "version": "v6.0.8", + "version": "v6.1.1", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "c1701e88ad0ca49fc6ad6cdf360bc0e1209fb5e1" + "reference": "56508865dd883dce3c863af11b3e8053adab30d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/c1701e88ad0ca49fc6ad6cdf360bc0e1209fb5e1", - "reference": "c1701e88ad0ca49fc6ad6cdf360bc0e1209fb5e1", + "url": "https://api.github.com/repos/symfony/mime/zipball/56508865dd883dce3c863af11b3e8053adab30d7", + "reference": "56508865dd883dce3c863af11b3e8053adab30d7", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "symfony/polyfill-intl-idn": "^1.10", "symfony/polyfill-mbstring": "^1.0" }, @@ -4053,7 +4052,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v6.0.8" + "source": "https://github.com/symfony/mime/tree/v6.1.1" }, "funding": [ { @@ -4069,20 +4068,20 @@ "type": "tidelift" } ], - "time": "2022-04-12T16:11:42+00:00" + "time": "2022-06-09T12:51:38+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "30885182c981ab175d4d034db0f6f469898070ab" + "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", - "reference": "30885182c981ab175d4d034db0f6f469898070ab", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", "shasum": "" }, "require": { @@ -4097,7 +4096,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4135,7 +4134,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" }, "funding": [ { @@ -4151,20 +4150,20 @@ "type": "tidelift" } ], - "time": "2021-10-20T20:35:02+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "81b86b50cf841a64252b439e738e97f4a34e2783" + "reference": "433d05519ce6990bf3530fba6957499d327395c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/81b86b50cf841a64252b439e738e97f4a34e2783", - "reference": "81b86b50cf841a64252b439e738e97f4a34e2783", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/433d05519ce6990bf3530fba6957499d327395c2", + "reference": "433d05519ce6990bf3530fba6957499d327395c2", "shasum": "" }, "require": { @@ -4176,7 +4175,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4216,7 +4215,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.26.0" }, "funding": [ { @@ -4232,20 +4231,20 @@ "type": "tidelift" } ], - "time": "2021-11-23T21:10:46+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "749045c69efb97c70d25d7463abba812e91f3a44" + "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/749045c69efb97c70d25d7463abba812e91f3a44", - "reference": "749045c69efb97c70d25d7463abba812e91f3a44", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/59a8d271f00dd0e4c2e518104cc7963f655a1aa8", + "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8", "shasum": "" }, "require": { @@ -4259,7 +4258,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4303,7 +4302,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.26.0" }, "funding": [ { @@ -4319,20 +4318,20 @@ "type": "tidelift" } ], - "time": "2021-09-14T14:02:44+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" + "reference": "219aa369ceff116e673852dce47c3a41794c14bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd", + "reference": "219aa369ceff116e673852dce47c3a41794c14bd", "shasum": "" }, "require": { @@ -4344,7 +4343,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4387,7 +4386,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0" }, "funding": [ { @@ -4403,20 +4402,20 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", "shasum": "" }, "require": { @@ -4431,7 +4430,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4470,7 +4469,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" }, "funding": [ { @@ -4486,20 +4485,20 @@ "type": "tidelift" } ], - "time": "2021-11-30T18:21:41+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976" + "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/bf44a9fd41feaac72b074de600314a93e2ae78e2", + "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2", "shasum": "" }, "require": { @@ -4508,7 +4507,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4546,7 +4545,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.26.0" }, "funding": [ { @@ -4562,20 +4561,20 @@ "type": "tidelift" } ], - "time": "2021-05-27T09:17:38+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c" + "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4407588e0d3f1f52efb65fbe92babe41f37fe50c", - "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", + "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", "shasum": "" }, "require": { @@ -4584,7 +4583,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4629,7 +4628,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" }, "funding": [ { @@ -4645,20 +4644,20 @@ "type": "tidelift" } ], - "time": "2022-03-04T08:16:47+00:00" + "time": "2022-05-10T07:21:04+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "5de4ba2d41b15f9bd0e19b2ab9674135813ec98f" + "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/5de4ba2d41b15f9bd0e19b2ab9674135813ec98f", - "reference": "5de4ba2d41b15f9bd0e19b2ab9674135813ec98f", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/13f6d1271c663dc5ae9fb843a8f16521db7687a1", + "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1", "shasum": "" }, "require": { @@ -4667,7 +4666,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4708,7 +4707,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.26.0" }, "funding": [ { @@ -4724,24 +4723,24 @@ "type": "tidelift" } ], - "time": "2021-09-13T13:58:11+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/process", - "version": "v6.0.8", + "version": "v6.1.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "d074154ea8b1443a96391f6e39f9e547b2dd01b9" + "reference": "318718453c2be58266f1a9e74063d13cb8dd4165" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/d074154ea8b1443a96391f6e39f9e547b2dd01b9", - "reference": "d074154ea8b1443a96391f6e39f9e547b2dd01b9", + "url": "https://api.github.com/repos/symfony/process/zipball/318718453c2be58266f1a9e74063d13cb8dd4165", + "reference": "318718453c2be58266f1a9e74063d13cb8dd4165", "shasum": "" }, "require": { - "php": ">=8.0.2" + "php": ">=8.1" }, "type": "library", "autoload": { @@ -4769,7 +4768,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.0.8" + "source": "https://github.com/symfony/process/tree/v6.1.0" }, "funding": [ { @@ -4785,24 +4784,24 @@ "type": "tidelift" } ], - "time": "2022-04-12T16:11:42+00:00" + "time": "2022-05-11T12:12:29+00:00" }, { "name": "symfony/routing", - "version": "v6.0.8", + "version": "v6.1.1", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "74c40c9fc334acc601a32fcf4274e74fb3bac11e" + "reference": "8f068b792e515b25e26855ac8dc7fe800399f3e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/74c40c9fc334acc601a32fcf4274e74fb3bac11e", - "reference": "74c40c9fc334acc601a32fcf4274e74fb3bac11e", + "url": "https://api.github.com/repos/symfony/routing/zipball/8f068b792e515b25e26855ac8dc7fe800399f3e5", + "reference": "8f068b792e515b25e26855ac8dc7fe800399f3e5", "shasum": "" }, "require": { - "php": ">=8.0.2" + "php": ">=8.1" }, "conflict": { "doctrine/annotations": "<1.12", @@ -4857,7 +4856,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v6.0.8" + "source": "https://github.com/symfony/routing/tree/v6.1.1" }, "funding": [ { @@ -4873,24 +4872,24 @@ "type": "tidelift" } ], - "time": "2022-04-22T08:18:02+00:00" + "time": "2022-06-08T12:21:15+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.0.1", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "e517458f278c2131ca9f262f8fbaf01410f2c65c" + "reference": "d66cd8ab656780f62c4215b903a420eb86358957" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e517458f278c2131ca9f262f8fbaf01410f2c65c", - "reference": "e517458f278c2131ca9f262f8fbaf01410f2c65c", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d66cd8ab656780f62c4215b903a420eb86358957", + "reference": "d66cd8ab656780f62c4215b903a420eb86358957", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "psr/container": "^2.0" }, "conflict": { @@ -4902,7 +4901,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.1-dev" }, "thanks": { "name": "symfony/contracts", @@ -4912,7 +4911,10 @@ "autoload": { "psr-4": { "Symfony\\Contracts\\Service\\": "" - } + }, + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -4939,7 +4941,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.0.1" + "source": "https://github.com/symfony/service-contracts/tree/v3.1.0" }, "funding": [ { @@ -4955,24 +4957,24 @@ "type": "tidelift" } ], - "time": "2022-03-13T20:10:05+00:00" + "time": "2022-05-07T08:07:09+00:00" }, { "name": "symfony/string", - "version": "v6.0.8", + "version": "v6.1.0", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "ac0aa5c2282e0de624c175b68d13f2c8f2e2649d" + "reference": "d3edc75baf9f1d4f94879764dda2e1ac33499529" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/ac0aa5c2282e0de624c175b68d13f2c8f2e2649d", - "reference": "ac0aa5c2282e0de624c175b68d13f2c8f2e2649d", + "url": "https://api.github.com/repos/symfony/string/zipball/d3edc75baf9f1d4f94879764dda2e1ac33499529", + "reference": "d3edc75baf9f1d4f94879764dda2e1ac33499529", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", @@ -5024,7 +5026,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.0.8" + "source": "https://github.com/symfony/string/tree/v6.1.0" }, "funding": [ { @@ -5040,24 +5042,24 @@ "type": "tidelift" } ], - "time": "2022-04-22T08:18:02+00:00" + "time": "2022-04-22T08:18:23+00:00" }, { "name": "symfony/translation", - "version": "v6.0.8", + "version": "v6.1.0", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "3d38cf8f8834148c4457681d539bc204de701501" + "reference": "b254416631615bc6fe49b0a67f18658827288147" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/3d38cf8f8834148c4457681d539bc204de701501", - "reference": "3d38cf8f8834148c4457681d539bc204de701501", + "url": "https://api.github.com/repos/symfony/translation/zipball/b254416631615bc6fe49b0a67f18658827288147", + "reference": "b254416631615bc6fe49b0a67f18658827288147", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "symfony/polyfill-mbstring": "~1.0", "symfony/translation-contracts": "^2.3|^3.0" }, @@ -5082,6 +5084,7 @@ "symfony/http-kernel": "^5.4|^6.0", "symfony/intl": "^5.4|^6.0", "symfony/polyfill-intl-icu": "^1.21", + "symfony/routing": "^5.4|^6.0", "symfony/service-contracts": "^1.1.2|^2|^3", "symfony/yaml": "^5.4|^6.0" }, @@ -5119,7 +5122,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v6.0.8" + "source": "https://github.com/symfony/translation/tree/v6.1.0" }, "funding": [ { @@ -5135,24 +5138,24 @@ "type": "tidelift" } ], - "time": "2022-04-22T08:18:02+00:00" + "time": "2022-05-11T12:12:29+00:00" }, { "name": "symfony/translation-contracts", - "version": "v3.0.1", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "c4183fc3ef0f0510893cbeedc7718fb5cafc9ac9" + "reference": "bfddd2a1faa271b782b791c361cc16e2dd49dfaa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/c4183fc3ef0f0510893cbeedc7718fb5cafc9ac9", - "reference": "c4183fc3ef0f0510893cbeedc7718fb5cafc9ac9", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/bfddd2a1faa271b782b791c361cc16e2dd49dfaa", + "reference": "bfddd2a1faa271b782b791c361cc16e2dd49dfaa", "shasum": "" }, "require": { - "php": ">=8.0.2" + "php": ">=8.1" }, "suggest": { "symfony/translation-implementation": "" @@ -5160,7 +5163,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.1-dev" }, "thanks": { "name": "symfony/contracts", @@ -5170,7 +5173,10 @@ "autoload": { "psr-4": { "Symfony\\Contracts\\Translation\\": "" - } + }, + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -5197,7 +5203,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.0.1" + "source": "https://github.com/symfony/translation-contracts/tree/v3.1.0" }, "funding": [ { @@ -5213,24 +5219,24 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2022-04-22T07:30:54+00:00" }, { "name": "symfony/var-dumper", - "version": "v6.0.8", + "version": "v6.1.0", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "fa61dfb4bd3068df2492013dc65f3190e9f550c0" + "reference": "98587d939cb783aa04e828e8fa857edaca24c212" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/fa61dfb4bd3068df2492013dc65f3190e9f550c0", - "reference": "fa61dfb4bd3068df2492013dc65f3190e9f550c0", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/98587d939cb783aa04e828e8fa857edaca24c212", + "reference": "98587d939cb783aa04e828e8fa857edaca24c212", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { @@ -5285,7 +5291,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.0.8" + "source": "https://github.com/symfony/var-dumper/tree/v6.1.0" }, "funding": [ { @@ -5301,7 +5307,7 @@ "type": "tidelift" } ], - "time": "2022-04-26T13:22:23+00:00" + "time": "2022-05-21T13:34:40+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -5585,21 +5591,21 @@ }, { "name": "webmozart/assert", - "version": "1.10.0", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" + "ext-ctype": "*", + "php": "^7.2 || ^8.0" }, "conflict": { "phpstan/phpstan": "<0.12.20", @@ -5637,9 +5643,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" + "source": "https://github.com/webmozarts/assert/tree/1.11.0" }, - "time": "2021-03-09T10:59:23+00:00" + "time": "2022-06-03T18:03:27+00:00" } ], "packages-dev": [ @@ -5957,16 +5963,16 @@ }, { "name": "laravel/sail", - "version": "v1.14.4", + "version": "v1.14.10", "source": { "type": "git", "url": "https://github.com/laravel/sail.git", - "reference": "0e0e51f19c758c79acbda11e3870641fbad5b7d9" + "reference": "0ea5d683af4d189071efcdb9e83946c10dab82c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sail/zipball/0e0e51f19c758c79acbda11e3870641fbad5b7d9", - "reference": "0e0e51f19c758c79acbda11e3870641fbad5b7d9", + "url": "https://api.github.com/repos/laravel/sail/zipball/0ea5d683af4d189071efcdb9e83946c10dab82c3", + "reference": "0ea5d683af4d189071efcdb9e83946c10dab82c3", "shasum": "" }, "require": { @@ -6013,7 +6019,7 @@ "issues": "https://github.com/laravel/sail/issues", "source": "https://github.com/laravel/sail" }, - "time": "2022-05-12T12:53:10+00:00" + "time": "2022-06-09T07:10:28+00:00" }, { "name": "mockery/mockery", @@ -8020,16 +8026,16 @@ }, { "name": "spatie/flare-client-php", - "version": "1.1.1", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/spatie/flare-client-php.git", - "reference": "1059fd8f229fa016b11063c6be9d1922d036adb7" + "reference": "86a380f5b1ce839af04a08f1c8f2697184cdf23f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/flare-client-php/zipball/1059fd8f229fa016b11063c6be9d1922d036adb7", - "reference": "1059fd8f229fa016b11063c6be9d1922d036adb7", + "url": "https://api.github.com/repos/spatie/flare-client-php/zipball/86a380f5b1ce839af04a08f1c8f2697184cdf23f", + "reference": "86a380f5b1ce839af04a08f1c8f2697184cdf23f", "shasum": "" }, "require": { @@ -8077,7 +8083,7 @@ ], "support": { "issues": "https://github.com/spatie/flare-client-php/issues", - "source": "https://github.com/spatie/flare-client-php/tree/1.1.1" + "source": "https://github.com/spatie/flare-client-php/tree/1.2.0" }, "funding": [ { @@ -8085,20 +8091,20 @@ "type": "github" } ], - "time": "2022-05-11T09:43:07+00:00" + "time": "2022-05-16T12:13:39+00:00" }, { "name": "spatie/ignition", - "version": "1.3.0", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/spatie/ignition.git", - "reference": "6aa8f1c8c46aff30c9bd4c354dc865eeee2ed59f" + "reference": "997363fbcce809b1e55f571997d49017f9c623d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/ignition/zipball/6aa8f1c8c46aff30c9bd4c354dc865eeee2ed59f", - "reference": "6aa8f1c8c46aff30c9bd4c354dc865eeee2ed59f", + "url": "https://api.github.com/repos/spatie/ignition/zipball/997363fbcce809b1e55f571997d49017f9c623d9", + "reference": "997363fbcce809b1e55f571997d49017f9c623d9", "shasum": "" }, "require": { @@ -8160,20 +8166,20 @@ "type": "github" } ], - "time": "2022-05-12T08:19:04+00:00" + "time": "2022-05-16T13:16:07+00:00" }, { "name": "spatie/laravel-ignition", - "version": "1.2.3", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/spatie/laravel-ignition.git", - "reference": "51e5daaa7e43c154fe57f1ddfbba862f9fe57646" + "reference": "5409e699fc19f4d53e59427445b08f90593fda28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/51e5daaa7e43c154fe57f1ddfbba862f9fe57646", - "reference": "51e5daaa7e43c154fe57f1ddfbba862f9fe57646", + "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/5409e699fc19f4d53e59427445b08f90593fda28", + "reference": "5409e699fc19f4d53e59427445b08f90593fda28", "shasum": "" }, "require": { @@ -8250,7 +8256,7 @@ "type": "github" } ], - "time": "2022-05-05T15:53:24+00:00" + "time": "2022-06-15T13:55:18+00:00" }, { "name": "theseer/tokenizer", diff --git a/routes/api.php b/routes/api.php index cc2816d..a0d19ce 100644 --- a/routes/api.php +++ b/routes/api.php @@ -19,24 +19,25 @@ Route::prefix('auth')->group(function (){ Route::post('logout', [\App\Http\Controllers\Auth\AuthController::class, 'logout']); }); -Route::middleware(['auth:sanctum', 'verified'])->group(function () { +Route::middleware(['auth:sanctum', 'ability:Admin'])->group(function () { + Route::apiResource('user', \App\Http\Controllers\UserController::class); + Route::apiResource('notification', \App\Http\Controllers\NotificationController::class); + Route::apiResource('faq', \App\Http\Controllers\FaqController::class); +}); +Route::middleware(['auth:sanctum', 'ability:Client'])->group(function () { Route::post('pld/overview', [\App\Http\Controllers\PldController::class, 'overviewByRegion']); Route::post('pld/list', [\App\Http\Controllers\PldController::class, 'listConsumption']); Route::post('pld/daily', [\App\Http\Controllers\PldController::class, 'consumptionByDaily']); Route::post('pld/schedule', [\App\Http\Controllers\PldController::class, 'consumptionBySchedule']); - Route::post('economy/gross', [\App\Http\Controllers\EconomyController::class, 'grossEconomy']); - Route::post('economy/accumulated', [\App\Http\Controllers\EconomyController::class, 'accumulatedEconomy']); - Route::post('economy/estimates', [\App\Http\Controllers\EconomyController::class, 'costEstimatesEconomy']); + Route::post('economy', [\App\Http\Controllers\EconomyController::class, 'index']); + Route::post('economy/grossAnnual', [\App\Http\Controllers\EconomyController::class, 'grossAnnualEconomy']); + Route::post('economy/grossMonthly', [\App\Http\Controllers\EconomyController::class, 'grossMonthlyEconomy']); + Route::post('economy/estimates', [\App\Http\Controllers\EconomyController::class, 'captiveMonthlyEconomy']); Route::post('economy/MWh', [\App\Http\Controllers\EconomyController::class, 'costMWhEconomy']); - Route::post('operation', [\App\Http\Controllers\OperationController::class, 'operationSummary']); - - Route::apiResource('user', \App\Http\Controllers\UserController::class); - Route::apiResource('notification', \App\Http\Controllers\NotificationController::class); - Route::apiResource('faq', \App\Http\Controllers\FaqController::class); - + Route::post('operation', [\App\Http\Controllers\OperationSummaryController::class, 'operationSummary']); });