This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
8
{
9
use UserExperiencePresenter;
10
11
/**
12
* The attributes that are mass assignable.
13
*
14
* @var array
15
*/
16
protected $fillable = [
17
'user_id',
18
'obtainable_id',
19
'obtainable_type',
20
'event_type',
21
'data'
22
];
23
24
/**
25
* The attributes that should be cast to native types.
26
*
27
* @var array
28
*/
29
protected $casts = [
30
'data' => 'array'
31
];
32
33
/**
34
* The "booting" method of the model.
35
*
36
* @return void
37
*/
38
protected static function boot()
39
{
40
parent::boot();
41
42
// Set the user id to the new log before saving it.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.