Completed
Push — master ( ffe767...90fa06 )
by Brandon
02:24
created

Device::location()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace App;
4
5
6
use Illuminate\Database\Eloquent\Model;
7
use Illuminate\Database\Eloquent\SoftDeletes;
8
9
class Device extends Model
10
{
11
    use SoftDeletes;
12
    
13
    /**
14
     * The attributes that are mass assignable.
15
     *
16
     * @var array
17
     */
18
    protected $fillable = [
19
        'name', 'location_id'
20
    ];
21
    
22
    public $timestamps = false;
23
    
24
    /**
25
     * Get the site for the location
26
     */
27
    public function location()
28
    {
29
        return $this->belongsTo('App\Location');
30
    }
31
}
32