EventAdmin   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 2
dl 0
loc 24
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A user() 0 4 1
A event() 0 4 1
1
<?php
2
3
/*
4
 * rmarchiv.tk
5
 * (c) 2016-2017 by Marcel 'ryg' Hering
6
 */
7
8
namespace App\Models;
9
10
use Illuminate\Database\Eloquent\Model;
11
12
/**
13
 * Class EventAdmin.
14
 *
15
 * @property int $id
16
 * @property int $user_id
17
 * @property int $event_id
18
 * @property \Carbon\Carbon $created_at
19
 * @property \Carbon\Carbon $updated_at
20
 * @method static \Illuminate\Database\Query\Builder|\App\Models\EventAdmin whereId($value)
21
 * @method static \Illuminate\Database\Query\Builder|\App\Models\EventAdmin whereUserId($value)
22
 * @method static \Illuminate\Database\Query\Builder|\App\Models\EventAdmin whereEventId($value)
23
 * @method static \Illuminate\Database\Query\Builder|\App\Models\EventAdmin whereCreatedAt($value)
24
 * @method static \Illuminate\Database\Query\Builder|\App\Models\EventAdmin whereUpdatedAt($value)
25
 * @mixin \Eloquent
26
 * @property-read \App\Models\User $user
27
 * @property-read \App\Models\Event $event
28
 * @property-read \Illuminate\Database\Eloquent\Collection|\Venturecraft\Revisionable\Revision[] $revisionHistory
29
 */
30
class EventAdmin extends Model
31
{
32
    use \Venturecraft\Revisionable\RevisionableTrait;
33
    protected $table = 'event_admins';
34
35
    public $timestamps = true;
36
37
    protected $fillable = [
38
        'user_id',
39
        'event_id',
40
    ];
41
42
    protected $guarded = [];
43
44
    public function user()
45
    {
46
        return $this->hasOne('App\Models\User', 'id', 'user_id');
47
    }
48
49
    public function event()
50
    {
51
        return $this->hasOne('App\Models\Event', 'id', 'user_id');
52
    }
53
}
54