1 | <?php namespace App\Modules\V1\Notifications; |
||
6 | class Notification extends Model{ |
||
7 | |||
8 | use SoftDeletes; |
||
9 | protected $table = 'notifications'; |
||
10 | protected $dates = ['created_at', 'updated_at', 'deleted_at']; |
||
11 | protected $hidden = ['deleted_at', 'item_type', 'data']; |
||
12 | protected $guarded = ['id']; |
||
13 | protected $fillable = ['key', 'data', 'item_name', 'item_type', 'item_id', 'notified']; |
||
14 | protected $appends = ['description']; |
||
15 | public $searchable = ['key', 'item_name', 'item_type']; |
||
16 | |||
17 | public function getCreatedAtAttribute($value) |
||
21 | |||
22 | public function getUpdatedAtAttribute($value) |
||
26 | |||
27 | public function getDeletedAtAttribute($value) |
||
31 | |||
32 | public function item() |
||
36 | |||
37 | public function setDataAttribute($value) |
||
41 | |||
42 | public function getDescriptionAttribute() |
||
46 | |||
47 | public static function boot() |
||
52 | } |
||
53 |
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.