Completed
Pull Request — develop (#76)
by Neil
07:56
created

Dashboard   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 30
rs 10
c 1
b 0
f 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A widgets() 0 3 1
1
<?php
2
3
namespace App\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class Dashboard extends Model
8
{
9
    /**
10
     * The table associated with the model.
11
     *
12
     * @var string
13
     */
14
    protected $table = 'dashboards';
15
16
    /**
17
     * The primary key column name.
18
     *
19
     * @var string
20
     */
21
    protected $primaryKey = 'dashboard_id';
22
23
    /**
24
     * Indicates if the model should be timestamped.
25
     *
26
     * @var bool
27
     */
28
    public $timestamps = false;
29
30
    protected $fillable = ['user_id', 'dashboard_name', 'access'];
31
32
    public function widgets() {
33
        return $this->hasMany('App\Models\UsersWidgets', 'dashboard_id');
34
    }
35
36
}
37