1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00
invoiceninja/app/Ninja/Repositories/TokenRepository.php
2017-01-30 21:40:43 +02:00

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');
}
}