1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00
invoiceninja/app/Ninja/Repositories/TokenRepository.php
2016-11-24 11:22:37 +02:00

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