1 | <?php namespace App\Modules\Acl; |
||
8 | class AclUser extends User { |
||
9 | |||
10 | use SoftDeletes, HasApiTokens; |
||
11 | protected $table = 'users'; |
||
12 | protected $dates = ['created_at', 'updated_at', 'deleted_at']; |
||
13 | protected $hidden = ['password', 'remember_token','deleted_at']; |
||
14 | protected $guarded = ['id']; |
||
15 | protected $fillable = ['profile_picture', 'name', 'email', 'password']; |
||
16 | public $searchable = ['name', 'email']; |
||
17 | |||
18 | public function getCreatedAtAttribute($value) |
||
22 | |||
23 | public function getUpdatedAtAttribute($value) |
||
27 | |||
28 | public function getDeletedAtAttribute($value) |
||
32 | |||
33 | /** |
||
34 | * Encrypt the password attribute before |
||
35 | * saving it in the storage. |
||
36 | * |
||
37 | * @param string $value |
||
38 | */ |
||
39 | public function setPasswordAttribute($value) |
||
43 | |||
44 | /** |
||
45 | * Get the entity's notifications. |
||
46 | */ |
||
47 | public function notifications() |
||
51 | |||
52 | /** |
||
53 | * Get the entity's read notifications. |
||
54 | */ |
||
55 | public function readNotifications() |
||
59 | |||
60 | /** |
||
61 | * Get the entity's unread notifications. |
||
62 | */ |
||
63 | public function unreadNotifications() |
||
67 | |||
68 | public function groups() |
||
72 | |||
73 | public function oauthClients() |
||
77 | |||
78 | /** |
||
79 | * Return fcm device tokens that will be used in sending fcm notifications. |
||
80 | * |
||
81 | * @return array |
||
82 | */ |
||
83 | public function routeNotificationForFCM() |
||
109 | |||
110 | /** |
||
111 | * The channels the user receives notification broadcasts on. |
||
112 | * |
||
113 | * @return string |
||
114 | */ |
||
115 | public function receivesBroadcastNotificationsOn() |
||
119 | |||
120 | /** |
||
121 | * Custom password validation. |
||
122 | * |
||
123 | * @param string $password |
||
124 | * @return boolean |
||
125 | */ |
||
126 | public function validateForPassportPasswordGrant($password) |
||
135 | |||
136 | public static function boot() |
||
141 | } |
||
142 |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()
method in theSon
calls the wrong method in the parent class.