| Total Complexity | 2 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 4 | class UserLog extends Model |
||
| 5 | { |
||
| 6 | /** |
||
| 7 | * The table associated with the model. |
||
| 8 | * |
||
| 9 | * @var string |
||
| 10 | */ |
||
| 11 | protected $table = 'user_log'; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * The attributes that are mass assignable. |
||
| 15 | * |
||
| 16 | * @var array |
||
| 17 | */ |
||
| 18 | protected $fillable = [ |
||
| 19 | 'user_id', |
||
| 20 | 'steam_id', |
||
| 21 | 'loggable_id', |
||
| 22 | 'loggable_type', |
||
| 23 | 'event_type', |
||
| 24 | 'data' |
||
| 25 | ]; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * The attributes that should be cast to native types. |
||
| 29 | * |
||
| 30 | * @var array |
||
| 31 | */ |
||
| 32 | protected $casts = [ |
||
| 33 | 'data' => 'array' |
||
| 34 | ]; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Get the user that owns the log. |
||
| 38 | * |
||
| 39 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
| 40 | */ |
||
| 41 | public function user() |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Get the loggable relation. |
||
| 48 | * |
||
| 49 | * @return \Illuminate\Database\Eloquent\Relations\MorphTo |
||
| 50 | */ |
||
| 51 | public function loggable() |
||
| 56 |