1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 16:31:33 +02:00
invoiceninja/app/Ninja/Repositories/AccountGatewayRepository.php
2017-01-30 21:40:43 +02:00

24 lines
691 B
PHP

<?php
namespace App\Ninja\Repositories;
use DB;
class AccountGatewayRepository extends BaseRepository
{
public function getClassName()
{
return 'App\Models\AccountGateway';
}
public function find($accountId)
{
$query = DB::table('account_gateways')
->join('gateways', 'gateways.id', '=', 'account_gateways.gateway_id')
->where('account_gateways.account_id', '=', $accountId)
->whereNull('account_gateways.deleted_at');
return $query->select('account_gateways.id', 'account_gateways.public_id', 'gateways.name', 'account_gateways.deleted_at', 'account_gateways.gateway_id');
}
}