Completed
Push — version-4 ( 5bb021 )
by
unknown
08:16
created

NotificationGroup::categories()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 2 Features 1
Metric Value
c 3
b 2
f 1
dl 0
loc 8
rs 9.4285
cc 1
eloc 5
nc 1
nop 0
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