| Code Coverage
| Classes and Traits | Functions and Methods | Lines
Total | 0.00% covered (danger) | 0.00% | 0 / 1 | 0.00% covered (danger) | 0.00% | 0 / 2 | CRAP | 0.00% covered (danger) | 0.00% | 0 / 2
Role | 0.00% covered (danger) | 0.00% | 0 / 1 | 0.00% covered (danger) | 0.00% | 0 / 2 | 6.00 | 0.00% covered (danger) | 0.00% | 0 / 2
users | 0.00% covered (danger) | 0.00% | 0 / 1 | 2.00 | 0.00% covered (danger) | 0.00% | 0 / 1
authorities | 0.00% covered (danger) | 0.00% | 0 / 1 | 2.00 | 0.00% covered (danger) | 0.00% | 0 / 1

1 | <?php
2 |
3 | namespace App;
4 |
5 | use Illuminate\Database\Eloquent\Model;
6 |
7 | class Role extends Model
8 | {
9 | protected $fillable = ['name'];
10 | function users(){
11 | return $this->belongsToMany('App\User','user_role','id_role','id_user');
12 | }
13 | function authorities(){
14 | return $this->belongsToMany('App\Authority','authority_role','id_role','id_authority');
15 | }
16 | }