1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00
invoiceninja/app/Ninja/Repositories/SubscriptionRepository.php

31 lines
770 B
PHP
Raw Normal View History

2017-11-28 08:57:02 +01:00
<?php
namespace App\Ninja\Repositories;
use App\Models\Subscription;
use DB;
class SubscriptionRepository extends BaseRepository
{
public function getClassName()
{
return 'App\Models\Subscription';
}
2017-11-29 11:44:28 +01:00
public function find($accountId)
2017-11-28 08:57:02 +01:00
{
2017-11-29 11:44:28 +01:00
$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',
2018-01-11 08:58:43 +01:00
'subscriptions.deleted_at',
'subscriptions.format'
2017-11-29 11:44:28 +01:00
);
2017-11-28 08:57:02 +01:00
2017-11-29 11:44:28 +01:00
return $query;
2017-11-28 08:57:02 +01:00
}
}