Profile   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 57
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A theme() 0 3 1
A user() 0 3 1
1
<?php
2
3
namespace App\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
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
        'imageee',
40
    ];
41
42
    protected $casts = [
43
        'theme_id' => 'integer',
44
    ];
45
46
    /**
47
     * A profile belongs to a user.
48
     *
49
     * @return mixed
50
     */
51
    public function user()
52
    {
53
        return $this->belongsTo('App\Models\User');
54
    }
55
56
    /**
57
     * Profile Theme Relationships.
58
     *
59
     * @var array
60
     */
61
    public function theme()
62
    {
63
        return $this->hasOne('App\Models\Theme');
64
    }
65
}
66