mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
df4fd497a6
- SECURITY PATCH
61 lines
1.8 KiB
PHP
61 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Accounting\ControllersLogic;
|
|
|
|
|
|
use App\Classes\Modules\Accounting\Standards\Rules\CanListBankStatementDetails;
|
|
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
|
use App\Classes\Modules\Accounting\Services\ListsBankStatementDetails;
|
|
use App\Http\Resources\BankStatementDetailResource;
|
|
use ErrorException;
|
|
use Illuminate\Http\JsonResponse;
|
|
use Illuminate\Http\Request;
|
|
|
|
class ListBankStatementDetailsLogic extends AbstractControllerLogic
|
|
{
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
protected function notification():array {
|
|
return [
|
|
'title' => 'Retrieved Bank Statement Details',
|
|
'message' => 'You have successfully retrieved a Bank Statement Details'
|
|
];
|
|
}
|
|
|
|
|
|
/** @var ListsBankStatementDetails */
|
|
private $listsBankStatementDetails;
|
|
|
|
/** @var CanListBankStatementDetails */
|
|
private $canListBankStatementDetails;
|
|
|
|
/**
|
|
* ListBankStatementDetailsLogic constructor.
|
|
* @param ListsBankStatementDetails $listsBankStatementDetails
|
|
* @param CanListBankStatementDetails $canListBankStatementDetails
|
|
*/
|
|
public function __construct(ListsBankStatementDetails $listsBankStatementDetails, CanListBankStatementDetails $canListBankStatementDetails)
|
|
{
|
|
$this->listsBankStatementDetails = $listsBankStatementDetails;
|
|
$this->canListBankStatementDetails = $canListBankStatementDetails;
|
|
}
|
|
|
|
|
|
/**
|
|
* @param Request $request
|
|
* @return JsonResponse
|
|
* @throws ErrorException
|
|
*/
|
|
public function logic(Request $request) : JsonResponse
|
|
{
|
|
$this->canListBankStatementDetails->passes();
|
|
|
|
$query = $this->listsBankStatementDetails->execute($this->listsBankStatementDetails->deserializeFilters($request->input('filters')));
|
|
|
|
return $this->collectionResponse(BankStatementDetailResource::collection($query));
|
|
}
|
|
|
|
}
|