mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
0fbda85a59
- Removed unused uses - Type hinting for method parameters - Removed commented code - Introduced comments for classes and methods - Short array syntax
26 lines
673 B
PHP
26 lines
673 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);
|
|
|
|
if (!Session::get('show_trash:token')) {
|
|
$query->where('account_tokens.deleted_at', '=', null);
|
|
}
|
|
|
|
return $query->select('account_tokens.public_id', 'account_tokens.name', 'account_tokens.token', 'account_tokens.public_id', 'account_tokens.deleted_at');
|
|
}
|
|
}
|