invoiceninja/app/Ninja/Repositories/AccountGatewayRepository.php

24 lines
691 B
PHP
Raw Normal View History

2017-01-30 21:40:43 +02:00
<?php
namespace App\Ninja\Repositories;
2015-11-06 00:37:04 +02:00
use DB;
class AccountGatewayRepository extends BaseRepository
{
public function getClassName()
{
return 'App\Models\AccountGateway';
}
public function find($accountId)
{
2016-05-14 17:23:20 -04:00
$query = DB::table('account_gateways')
2015-11-06 00:37:04 +02:00
->join('gateways', 'gateways.id', '=', 'account_gateways.gateway_id')
->where('account_gateways.account_id', '=', $accountId)
->whereNull('account_gateways.deleted_at');
2016-05-14 17:23:20 -04:00
return $query->select('account_gateways.id', 'account_gateways.public_id', 'gateways.name', 'account_gateways.deleted_at', 'account_gateways.gateway_id');
2015-11-06 00:37:04 +02:00
}
}