Total Complexity | 1 |
Total Lines | 71 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
7 | class Social extends Model |
||
8 | { |
||
9 | /** |
||
10 | * The database table used by the model. |
||
11 | * |
||
12 | * @var string |
||
13 | */ |
||
14 | protected $table = 'social_logins'; |
||
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 | |||
39 | /** |
||
40 | * The attributes that should be mutated to dates. |
||
41 | * |
||
42 | * @var array |
||
43 | */ |
||
44 | protected $dates = [ |
||
45 | 'created_at', |
||
46 | 'updated_at', |
||
47 | ]; |
||
48 | |||
49 | /** |
||
50 | * The attributes that are mass assignable. |
||
51 | * |
||
52 | * @var array |
||
53 | */ |
||
54 | protected $fillable = [ |
||
55 | 'user_id', |
||
56 | 'provider', |
||
57 | 'social_id', |
||
58 | ]; |
||
59 | |||
60 | /** |
||
61 | * The attributes that should be cast to native types. |
||
62 | * |
||
63 | * @var array |
||
64 | */ |
||
65 | protected $casts = [ |
||
66 | 'id' => 'integer', |
||
67 | 'user_id' => 'integer', |
||
68 | 'provider' => 'string', |
||
69 | 'social_id' => 'string', |
||
70 | ]; |
||
71 | |||
72 | /** |
||
73 | * Get the user that owns the social. |
||
74 | */ |
||
75 | public function user() |
||
80 |