Log::admin()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class Log extends Model
8
{
9
    /**
10
     * @var string
11
     */
12
    protected $table = 'logs';
13
14
    /**
15
     * @var string
16
     */
17
    protected $primaryKey = 'id';
18
19
    /**
20
     * @var bool
21
     */
22
    public $timestamps = true;
23
24
    /**
25
     * @var array
26
     */
27
    protected $dates = [
28
        'created_at',
29
        'updated_at'
30
    ];
31
32
    /**
33
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
34
     */
35
    public function thread() {
36
        return $this->belongsTo('App\Thread', 'thread_id');
37
    }
38
39
    /**
40
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
41
     */
42
    public function article() {
43
        return $this->belongsTo('App\Articles', 'article_id');
44
    }
45
46
    /**
47
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
48
     */
49
    public function admin() {
50
        return $this->belongsTo('App\Admin', 'admin_id');
51
    }
52
53
    /**
54
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
55
     */
56
    public function doctor() {
57
        return $this->belongsTo('App\Doctor', 'doctor_id');
58
    }
59
60
    /**
61
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
62
     */
63
    public function member() {
64
        return $this->belongsTo('App\User', 'user_id');
65
    }
66
}
67