mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
30 lines
726 B
PHP
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;
|
|
}
|
|
}
|