mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-14 15:13:29 +01:00
25 lines
603 B
PHP
25 lines
603 B
PHP
<?php
|
|
|
|
namespace App\Ninja\Repositories;
|
|
|
|
use App\Models\Token;
|
|
use DB;
|
|
|
|
class TokenRepository extends BaseRepository
|
|
{
|
|
public function getClassName()
|
|
{
|
|
return 'App\Models\AccountToken';
|
|
}
|
|
|
|
public function find($userId)
|
|
{
|
|
$query = DB::table('account_tokens')
|
|
->where('account_tokens.user_id', '=', $userId)
|
|
->whereNull('account_tokens.deleted_at');
|
|
;
|
|
|
|
return $query->select('account_tokens.public_id', 'account_tokens.name', 'account_tokens.token', 'account_tokens.public_id', 'account_tokens.deleted_at');
|
|
}
|
|
}
|