Completed
Push — master ( fac72b...14ba86 )
by Faiq
14s
created

Log   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 58
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 12
dl 0
loc 58
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A article() 0 2 1
A thread() 0 2 1
A doctor() 0 2 1
A member() 0 2 1
A admin() 0 2 1
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