mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-26 09:02:53 -04:00 
			
		
		
		
	- Removed unused uses - Type hinting for method parameters - Removed commented code - Introduced comments for classes and methods - Short array syntax
		
			
				
	
	
		
			52 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			52 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php namespace App\Services;
 | |
| 
 | |
| use App\Ninja\Repositories\AccountGatewayRepository;
 | |
| use App\Ninja\Datatables\AccountGatewayDatatable;
 | |
| 
 | |
| /**
 | |
|  * Class AccountGatewayService
 | |
|  */
 | |
| class AccountGatewayService extends BaseService
 | |
| {
 | |
|     /**
 | |
|      * @var AccountGatewayRepository
 | |
|      */
 | |
|     protected $accountGatewayRepo;
 | |
| 
 | |
|     /**
 | |
|      * @var DatatableService
 | |
|      */
 | |
|     protected $datatableService;
 | |
| 
 | |
|     /**
 | |
|      * AccountGatewayService constructor.
 | |
|      *
 | |
|      * @param AccountGatewayRepository $accountGatewayRepo
 | |
|      * @param DatatableService $datatableService
 | |
|      */
 | |
|     public function __construct(AccountGatewayRepository $accountGatewayRepo, DatatableService $datatableService)
 | |
|     {
 | |
|         $this->accountGatewayRepo = $accountGatewayRepo;
 | |
|         $this->datatableService = $datatableService;
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * @return AccountGatewayRepository
 | |
|      */
 | |
|     protected function getRepo()
 | |
|     {
 | |
|         return $this->accountGatewayRepo;
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * @param $accountId
 | |
|      * @return \Illuminate\Http\JsonResponse
 | |
|      */
 | |
|     public function getDatatable($accountId)
 | |
|     {
 | |
|         $query = $this->accountGatewayRepo->find($accountId);
 | |
| 
 | |
|         return $this->datatableService->createDatatable(new AccountGatewayDatatable(false), $query);
 | |
|     }
 | |
| }
 |