1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00
invoiceninja/app/Ninja/Repositories/SubscriptionRepository.php
2017-11-29 12:44:28 +02:00

30 lines
726 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'
);
return $query;
}
}