2015-11-05 23:37:04 +01:00
|
|
|
<?php namespace App\Services;
|
|
|
|
|
|
|
|
use URL;
|
|
|
|
use App\Services\BaseService;
|
|
|
|
use App\Ninja\Repositories\AccountGatewayRepository;
|
2016-05-23 18:52:20 +02:00
|
|
|
use App\Ninja\Datatables\AccountGatewayDatatable;
|
2015-11-05 23:37:04 +01:00
|
|
|
|
|
|
|
class AccountGatewayService extends BaseService
|
|
|
|
{
|
|
|
|
protected $accountGatewayRepo;
|
|
|
|
protected $datatableService;
|
|
|
|
|
|
|
|
public function __construct(AccountGatewayRepository $accountGatewayRepo, DatatableService $datatableService)
|
|
|
|
{
|
|
|
|
$this->accountGatewayRepo = $accountGatewayRepo;
|
|
|
|
$this->datatableService = $datatableService;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function getRepo()
|
|
|
|
{
|
|
|
|
return $this->accountGatewayRepo;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getDatatable($accountId)
|
|
|
|
{
|
|
|
|
$query = $this->accountGatewayRepo->find($accountId);
|
|
|
|
|
2016-05-23 18:52:20 +02:00
|
|
|
return $this->datatableService->createDatatable(new AccountGatewayDatatable(false), $query);
|
2015-11-05 23:37:04 +01:00
|
|
|
}
|
|
|
|
|
2016-05-23 18:52:20 +02:00
|
|
|
}
|