Completed
Pull Request — develop (#184)
by Neil
25:03
created

Processor::device()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
/**
8
 * App\Models\Processor
9
 *
10
 * @property integer $processor_id
11
 * @property integer $device_id
12
 * @property-read \App\Models\Device $device
13
 * @mixin \Eloquent
14
 */
15
class Processor extends Model
16
{
17
    /**
18
     * Indicates if the model should be timestamped.
19
     *
20
     * @var bool
21
     */
22
    public $timestamps = false;
23
    /**
24
     * The table associated with the model.
25
     *
26
     * @var string
27
     */
28
    protected $table = 'processors';
29
    /**
30
     * The primary key column name.
31
     *
32
     * @var string
33
     */
34
    protected $primaryKey = 'processor_id';
35
36
    // ---- Define Helper Functions ----
37
38
    // ---- Accessors/Mutators ----
39
40
41
    // ---- Query scopes ----
42
43
44
    // ---- Define Relationships ----
45
46
    /**
47
     * Get the device this port belongs to.
48
     *
49
     */
50
    public function device()
51
    {
52
        return $this->belongsTo('App\Models\Device', 'device_id', 'device_id');
53
    }
54
}
55
56