Tag   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 13
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A posts() 0 4 1
1
<?php namespace Modules\Blog\Entities;
2
3
use Dimsav\Translatable\Translatable;
4
use Illuminate\Database\Eloquent\Model;
5
6
class Tag extends Model
7
{
8
    use Translatable;
9
10
    protected $fillable = ['name', 'slug'];
11
    public $translatedAttributes = ['name', 'slug'];
12
    protected $table = 'blog__tags';
13
14
    public function posts()
15
    {
16
        return $this->belongsToMany('Modules\Blog\Entities\Post', 'blog__post_tag');
17
    }
18
}
19