1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 15:13:29 +01:00
invoiceninja/app/Ninja/Repositories/TokenRepository.php

25 lines
603 B
PHP
Raw Normal View History

2017-01-30 20:40:43 +01:00
<?php
namespace App\Ninja\Repositories;
2015-11-05 23:37:04 +01:00
use App\Models\Token;
2017-01-30 20:40:43 +01:00
use DB;
2015-11-05 23:37:04 +01:00
class TokenRepository extends BaseRepository
{
public function getClassName()
{
return 'App\Models\AccountToken';
}
2016-05-08 20:50:35 +02:00
public function find($userId)
2015-11-05 23:37:04 +01:00
{
$query = DB::table('account_tokens')
->where('account_tokens.user_id', '=', $userId)
2017-01-30 17:05:31 +01:00
->whereNull('account_tokens.deleted_at');
;
2015-11-05 23:37:04 +01:00
return $query->select('account_tokens.public_id', 'account_tokens.name', 'account_tokens.token', 'account_tokens.public_id', 'account_tokens.deleted_at');
}
}