mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
39 lines
1.2 KiB
PHP
39 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Reports\ControllersLogic;
|
|
|
|
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
|
use App\Models\User;
|
|
use Maatwebsite\Excel\Concerns\FromCollection;
|
|
use Illuminate\Http\JsonResponse;
|
|
use Illuminate\Http\Request;
|
|
use App\Classes\Modules\Reports\ControllersLogic\ExportExcelLogic;
|
|
use App\Classes\Modules\PackingLists\Processors\FetchPackingListProcessor;
|
|
|
|
class CustomcClearanceLogic extends AbstractControllerLogic
|
|
{
|
|
private $excelExportLogic;
|
|
private $listsPackingListProcessor;
|
|
|
|
public function __construct(FetchPackingListProcessor $listsPackingListProcessor){
|
|
$this->listsPackingListProcessor = $listsPackingListProcessor;
|
|
}
|
|
|
|
protected function notification():array {
|
|
return [];
|
|
}
|
|
|
|
public function logic(Request $request) : JsonResponse
|
|
{
|
|
$packingLists = $this->listsPackingListProcessor->execute();
|
|
$excelExportLogic = new ExportExcelLogic(collect($packingLists));
|
|
$this->excelExportLogic = $excelExportLogic;
|
|
|
|
return response()->json(['success' => true]);
|
|
}
|
|
|
|
public function getExcelCollection(){
|
|
return $this->excelExportLogic;
|
|
}
|
|
}
|