Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 2 |
| Role | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
6.00 | |
0.00% |
0 / 2 |
| users | |
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 1 |
|||
| authorities | |
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 1 |
|||
| <?php | |
| namespace App; | |
| use Illuminate\Database\Eloquent\Model; | |
| class Role extends Model | |
| { | |
| protected $fillable = ['name']; | |
| function users(){ | |
| return $this->belongsToMany('App\User','user_role','id_role','id_user'); | |
| } | |
| function authorities(){ | |
| return $this->belongsToMany('App\Authority','authority_role','id_role','id_authority'); | |
| } | |
| } |