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 AwardCat. |
14
|
|
|
* |
15
|
|
|
* @property int $id |
16
|
|
|
* @property string $title |
17
|
|
|
* @property int $award_page_id |
18
|
|
|
* @property int $year |
19
|
|
|
* @property int $month |
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\AwardCat whereId($value) |
25
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\AwardCat whereTitle($value) |
26
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\AwardCat whereAwardPageId($value) |
27
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\AwardCat whereYear($value) |
28
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\AwardCat whereMonth($value) |
29
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\AwardCat whereUserId($value) |
30
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\AwardCat whereDeletedAt($value) |
31
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\AwardCat whereCreatedAt($value) |
32
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\AwardCat whereUpdatedAt($value) |
33
|
|
|
* @mixin \Eloquent |
34
|
|
|
* @property-read \App\Models\AwardPage $awardpage |
35
|
|
|
* @property-read \App\Models\User $user |
36
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection|\Venturecraft\Revisionable\Revision[] $revisionHistory |
37
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\AwardSubcat[] $subcats |
38
|
|
|
*/ |
39
|
|
|
class AwardCat extends Model |
40
|
|
|
{ |
41
|
|
|
use \Venturecraft\Revisionable\RevisionableTrait; |
42
|
|
|
|
43
|
|
|
public $timestamps = true; |
|
|
|
|
44
|
|
|
protected $table = 'award_cats'; |
|
|
|
|
45
|
|
|
protected $fillable = [ |
46
|
|
|
'title', |
47
|
|
|
'award_page_id', |
48
|
|
|
'year', |
49
|
|
|
'month', |
50
|
|
|
'user_id', |
51
|
|
|
]; |
52
|
|
|
|
53
|
|
|
protected $guarded = []; |
54
|
|
|
|
55
|
|
|
public function awardpage() |
56
|
|
|
{ |
57
|
|
|
return $this->hasOne('App\Models\AwardPage', 'id', 'award_page_id'); |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
public function subcats() |
61
|
|
|
{ |
62
|
|
|
return $this->hasMany('App\Models\AwardSubcat', 'cat_id', 'id'); |
63
|
|
|
} |
64
|
|
|
|
65
|
|
|
public function user() |
66
|
|
|
{ |
67
|
|
|
return $this->hasOne('App\Models\User', 'id', 'user_id'); |
68
|
|
|
} |
69
|
|
|
} |
70
|
|
|
|
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.