Completed
Push — version-4 ( a26cca...5903bf )
by
unknown
02:38
created

NotificationGroup   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A categories() 0 8 1
1
<?php
2
3
namespace Fenos\Notifynder\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class NotificationGroup extends Model
8
{
9
    protected $fillable = ['name'];
10
11
    public $timestamps = false;
12
13
    public function categories()
14
    {
15
        return $this->belongsToMany(
16
            NotificationCategory::class,
17
            'notifications_categories_in_groups',
18
            'group_id', 'category_id'
19
        );
20
    }
21
}
22