Activation   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 75
Duplicated Lines 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
eloc 22
c 2
b 1
f 0
dl 0
loc 75
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A user() 0 3 1
1
<?php
2
3
namespace App\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class Activation extends Model
8
{
9
    /**
10
     * The database table used by the model.
11
     *
12
     * @var string
13
     */
14
    protected $table = 'activations';
15
16
    /**
17
     * Indicates if the model should be timestamped.
18
     *
19
     * @var bool
20
     */
21
    public $timestamps = true;
22
23
    /**
24
     * The attributes that are not mass assignable.
25
     *
26
     * @var array
27
     */
28
    protected $guarded = [
29
        'id',
30
    ];
31
32
    /**
33
     * The attributes that are hidden.
34
     *
35
     * @var array
36
     */
37
    protected $hidden = [
38
        'user_id',
39
        'token',
40
        'ip_address',
41
    ];
42
43
    /**
44
     * The attributes that should be mutated to dates.
45
     *
46
     * @var array
47
     */
48
    protected $dates = [
49
        'created_at',
50
        'updated_at',
51
    ];
52
53
    /**
54
     * The attributes that are mass assignable.
55
     *
56
     * @var array
57
     */
58
    protected $fillable = [
59
        'user_id',
60
        'token',
61
        'ip_address',
62
    ];
63
64
    /**
65
     * The attributes that should be cast to native types.
66
     *
67
     * @var array
68
     */
69
    protected $casts = [
70
        'id'            => 'integer',
71
        'user_id'       => 'integer',
72
        'token'         => 'string',
73
        'ip_address'    => 'string',
74
    ];
75
76
    /**
77
     * Get the user that owns the activation.
78
     */
79
    public function user()
80
    {
81
        return $this->belongsTo(\App\Models\User::class);
82
    }
83
}
84