1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-13 22:54:25 +01:00
invoiceninja/app/Ninja/Repositories/SubscriptionRepository.php
2018-01-11 09:58:43 +02:00

31 lines
770 B
PHP

<?php
namespace App\Ninja\Repositories;
use App\Models\Subscription;
use DB;
class SubscriptionRepository extends BaseRepository
{
public function getClassName()
{
return 'App\Models\Subscription';
}
public function find($accountId)
{
$query = DB::table('subscriptions')
->where('subscriptions.account_id', '=', $accountId)
->whereNull('subscriptions.deleted_at')
->select(
'subscriptions.public_id',
'subscriptions.target_url as target',
'subscriptions.event_id as event',
'subscriptions.deleted_at',
'subscriptions.format'
);
return $query;
}
}