Tag   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A tag_relations() 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 GeneaLabs\LaravelModelCaching\Traits\Cachable;
11
use Illuminate\Database\Eloquent\Model;
12
13
/**
14
 * Class Tag.
15
 *
16
 * @property int $id
17
 * @property string $title
18
 * @property \Carbon\Carbon $created_at
19
 * @property \Carbon\Carbon $updated_at
20
 * @method static \Illuminate\Database\Query\Builder|\App\Models\Tag whereId($value)
21
 * @method static \Illuminate\Database\Query\Builder|\App\Models\Tag whereTitle($value)
22
 * @method static \Illuminate\Database\Query\Builder|\App\Models\Tag whereCreatedAt($value)
23
 * @method static \Illuminate\Database\Query\Builder|\App\Models\Tag whereUpdatedAt($value)
24
 * @mixin \Eloquent
25
 * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\TagRelation[] $tag_relations
26
 * @property-read \Illuminate\Database\Eloquent\Collection|\Venturecraft\Revisionable\Revision[] $revisionHistory
27
 */
28
class Tag extends Model
29
{
30
    use \Venturecraft\Revisionable\RevisionableTrait;
31
    protected $table = 'tags';
32
33
    public $timestamps = true;
34
35
    protected $fillable = [
36
        'title',
37
    ];
38
39
    protected $guarded = [];
40
41
    public function tag_relations()
42
    {
43
        return $this->hasMany('App\Models\TagRelation', 'tag_id', 'id');
44
    }
45
}
46