GamesDeveloper::game()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/*
4
 * rmarchiv.tk
5
 * (c) 2016-2017 by Marcel 'ryg' Hering
6
 */
7
8
namespace App\Models;
9
10
use GeneaLabs\LaravelModelCaching\Traits\Cachable;
11
use Illuminate\Database\Eloquent\Model;
12
use Spatie\Activitylog\Traits\LogsActivity;
13
14
/**
15
 * Class GamesDeveloper.
16
 *
17
 * @property int $id
18
 * @property int $user_id
19
 * @property int $game_id
20
 * @property int $developer_id
21
 * @property string $deleted_at
22
 * @property \Carbon\Carbon $created_at
23
 * @property \Carbon\Carbon $updated_at
24
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesDeveloper whereId($value)
25
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesDeveloper whereUserId($value)
26
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesDeveloper whereGameId($value)
27
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesDeveloper whereDeveloperId($value)
28
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesDeveloper whereDeletedAt($value)
29
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesDeveloper whereCreatedAt($value)
30
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesDeveloper whereUpdatedAt($value)
31
 * @mixin \Eloquent
32
 * @property-read \App\Models\Developer $developer
33
 * @property-read \App\Models\Game $game
34
 * @property-read \Illuminate\Database\Eloquent\Collection|\Venturecraft\Revisionable\Revision[] $revisionHistory
35
 * @property-read \Illuminate\Database\Eloquent\Collection|\Spatie\Activitylog\Models\Activity[] $activity
36
 */
37
class GamesDeveloper extends Model
38
{
39
    use \Venturecraft\Revisionable\RevisionableTrait;
40
    use LogsActivity;
41
42
    protected $table = 'games_developer';
43
44
    public $timestamps = true;
45
46
    protected $fillable = [
47
        'user_id',
48
        'game_id',
49
        'developer_id',
50
    ];
51
52
    protected $guarded = [];
53
54
    public function developer()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
55
    {
56
        return $this->hasOne('App\Models\Developer', 'id', 'developer_id')->with('user');
57
    }
58
59
    public function game()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
60
    {
61
        return $this->hasOne('App\Models\Game', 'id', 'game_id')->with('comments', 'maker', 'gamefiles', 'cdcs');
62
    }
63
}
64