Completed
Pull Request — master (#10)
by Fèvre
04:25 queued 02:11
created

Badge::users()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace Xetaravel\Models;
3
4
class Badge extends Model
5
{
6
    /**
7
     * The attributes that are mass assignable.
8
     *
9
     * @var array
10
     */
11
    protected $fillable = [
12
        'name',
13
        'image',
14
        'type',
15
        'rule'
16
    ];
17
18
    /**
19
     * Get the users that owns the badge.
20
     *
21
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTomany
22
     */
23
    public function users()
24
    {
25
        return $this->belongsToMany(User::class);
26
    }
27
}
28