|
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
|
|
|
|
|
13
|
|
|
/** |
|
14
|
|
|
* Class Maker. |
|
15
|
|
|
* |
|
16
|
|
|
* @property int $id |
|
17
|
|
|
* @property string $title |
|
18
|
|
|
* @property string $short |
|
19
|
|
|
* @property string $website_url |
|
20
|
|
|
* @property int $user_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\Maker whereId($value) |
|
25
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\Maker whereTitle($value) |
|
26
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\Maker whereShort($value) |
|
27
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\Maker whereWebsiteUrl($value) |
|
28
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\Maker whereUserId($value) |
|
29
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\Maker whereDeletedAt($value) |
|
30
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\Maker whereCreatedAt($value) |
|
31
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\Maker whereUpdatedAt($value) |
|
32
|
|
|
* @mixin \Eloquent |
|
33
|
|
|
* @property-read \App\Models\Game $game |
|
34
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Game[] $games |
|
35
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection|\Venturecraft\Revisionable\Revision[] $revisionHistory |
|
36
|
|
|
*/ |
|
37
|
|
|
class Maker extends Model |
|
38
|
|
|
{ |
|
39
|
|
|
use \Venturecraft\Revisionable\RevisionableTrait; |
|
40
|
|
|
protected $table = 'makers'; |
|
41
|
|
|
|
|
42
|
|
|
public $timestamps = true; |
|
43
|
|
|
|
|
44
|
|
|
protected $fillable = [ |
|
45
|
|
|
'title', |
|
46
|
|
|
'short', |
|
47
|
|
|
'website_url', |
|
48
|
|
|
'user_id', |
|
49
|
|
|
]; |
|
50
|
|
|
|
|
51
|
|
|
protected $guarded = []; |
|
52
|
|
|
|
|
53
|
|
|
public function games() |
|
54
|
|
|
{ |
|
55
|
|
|
return $this->hasMany('App\Models\Game', 'maker_id', 'id'); |
|
56
|
|
|
} |
|
57
|
|
|
} |
|
58
|
|
|
|