2016-07-21 14:35:23 +02:00
|
|
|
<?php namespace App\Ninja\Repositories;
|
2015-11-05 23:37:04 +01:00
|
|
|
|
|
|
|
use DB;
|
|
|
|
use Session;
|
|
|
|
use App\Models\Token;
|
|
|
|
|
|
|
|
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')
|
2016-11-24 10:22:37 +01:00
|
|
|
->where('account_tokens.user_id', '=', $userId)
|
|
|
|
->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');
|
|
|
|
}
|
|
|
|
}
|