1 | <?php |
||
0 ignored issues
–
show
Coding Style
introduced
by
![]() |
|||
2 | declare(strict_types=1); |
||
3 | |||
4 | namespace Gewaer\Models; |
||
5 | |||
6 | use Gewaer\Traits\PermissionsTrait; |
||
7 | |||
8 | class Users extends \Baka\Auth\Models\Users |
||
9 | { |
||
10 | use PermissionsTrait; |
||
11 | |||
12 | /** |
||
13 | * Initialize method for model. |
||
14 | */ |
||
15 | 5 | public function initialize() |
|
16 | { |
||
17 | 5 | parent::initialize(); |
|
18 | |||
19 | 5 | $this->setSource('users'); |
|
20 | 5 | } |
|
21 | |||
22 | /** |
||
23 | * Returns table name mapped in the model. |
||
24 | * |
||
25 | * @return string |
||
26 | */ |
||
27 | 4 | public function getSource(): string |
|
28 | { |
||
29 | 4 | return 'users'; |
|
30 | } |
||
31 | |||
32 | /** |
||
33 | * Get the User key for redis |
||
34 | * |
||
35 | * @return string |
||
36 | */ |
||
37 | public function getKey(): string |
||
38 | { |
||
39 | return $this->id; |
||
40 | } |
||
41 | } |
||
42 |