1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 00:11:35 +02:00
invoiceninja/app/Services/AccountGatewayService.php
2016-05-23 19:52:20 +03:00

32 lines
842 B
PHP

<?php namespace App\Services;
use URL;
use App\Services\BaseService;
use App\Ninja\Repositories\AccountGatewayRepository;
use App\Ninja\Datatables\AccountGatewayDatatable;
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);
return $this->datatableService->createDatatable(new AccountGatewayDatatable(false), $query);
}
}