1 | <?php |
||
6 | class User extends Eloquent implements UserInterface, RemindableInterface |
||
|
|||
7 | { |
||
8 | /** |
||
9 | * The database table used by the model. |
||
10 | * |
||
11 | * @var string |
||
12 | */ |
||
13 | protected $table = 'users'; |
||
14 | |||
15 | /** |
||
16 | * The attributes excluded from the model's JSON form. |
||
17 | * |
||
18 | * @var array |
||
19 | */ |
||
20 | protected $hidden = ['password']; |
||
21 | |||
22 | /** |
||
23 | * Get the unique identifier for the user. |
||
24 | * |
||
25 | * @return mixed |
||
26 | */ |
||
27 | public function getAuthIdentifier() |
||
28 | { |
||
29 | return $this->getKey(); |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * Get the password for the user. |
||
34 | * |
||
35 | * @return string |
||
36 | */ |
||
37 | public function getAuthPassword() |
||
38 | { |
||
39 | return $this->password; |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * Get the e-mail address where password reminders are sent. |
||
44 | * |
||
45 | * @return string |
||
46 | */ |
||
47 | public function getReminderEmail() |
||
48 | { |
||
49 | return $this->email; |
||
50 | } |
||
51 | } |
||
52 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.