Total Complexity | 2 |
Total Lines | 56 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
7 | class Profile extends Model |
||
8 | { |
||
9 | /** |
||
10 | * The database table used by the model. |
||
11 | * |
||
12 | * @var string |
||
13 | */ |
||
14 | protected $table = 'profiles'; |
||
15 | |||
16 | /** |
||
17 | * The attributes that are not mass assignable. |
||
18 | * |
||
19 | * @var array |
||
20 | */ |
||
21 | protected $guarded = [ |
||
22 | 'id', |
||
23 | ]; |
||
24 | |||
25 | /** |
||
26 | * Fillable fields for a Profile. |
||
27 | * |
||
28 | * @var array |
||
29 | */ |
||
30 | protected $fillable = [ |
||
31 | 'theme_id', |
||
32 | 'location', |
||
33 | 'bio', |
||
34 | 'twitter_username', |
||
35 | 'github_username', |
||
36 | 'user_profile_bg', |
||
37 | 'avatar', |
||
38 | 'avatar_status', |
||
39 | ]; |
||
40 | |||
41 | protected $casts = [ |
||
42 | 'theme_id' => 'integer', |
||
43 | ]; |
||
44 | |||
45 | /** |
||
46 | * A profile belongs to a user. |
||
47 | * |
||
48 | * @return mixed |
||
49 | */ |
||
50 | public function user() |
||
51 | { |
||
52 | return $this->belongsTo(\App\Models\User::class); |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * Profile Theme Relationships. |
||
57 | * |
||
58 | * @var array |
||
59 | */ |
||
60 | public function theme() |
||
63 | } |
||
64 | } |
||
65 |