mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
31 lines
770 B
PHP
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;
|
|
}
|
|
}
|