mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-14 23:22:52 +01:00
23 lines
606 B
PHP
23 lines
606 B
PHP
<?php namespace App\Ninja\Repositories;
|
|
|
|
use DB;
|
|
use Session;
|
|
use App\Models\Token;
|
|
|
|
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');
|
|
}
|
|
}
|