Total Complexity | 3 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | class TagGroup extends Model |
||
20 | { |
||
21 | protected $table = 'tagging_tag_groups'; |
||
22 | |||
23 | public $timestamps = false; |
||
24 | |||
25 | protected $fillable = ['name']; |
||
26 | |||
27 | public function __construct(array $attributes = []) |
||
28 | { |
||
29 | parent::__construct($attributes); |
||
30 | |||
31 | $this->connection = config('tagging.connection'); |
||
32 | } |
||
33 | |||
34 | /** |
||
35 | * Get suggested tags |
||
36 | */ |
||
37 | public function tags() |
||
38 | { |
||
39 | $model = TaggingUtility::tagModelString(); |
||
40 | |||
41 | return $this->hasMany($model, 'tag_group_id'); |
||
42 | } |
||
43 | |||
44 | public function setNameAttribute($value) |
||
48 | } |
||
49 | } |
||
50 |