romanbican / roles

Powerful package for handling roles and permissions in Laravel 5
MIT License
1.16k stars 296 forks source link

Role Users function not working $admin->users(); #183

Open mahmoud-birdsol opened 8 years ago

mahmoud-birdsol commented 8 years ago

Laravel 5.2 Has a different config/auth file for the model you just need to change

public function users() { return $this->belongsToMany(config('auth.model'))->withTimestamps(); }

to

public function users() { return $this->belongsToMany(config('auth.providers.users.model'))->withTimestamps(); }

or just add another configuration variable in your config file and use that

johannesschobel commented 8 years ago

I would prefer the config variable approach. What do you think about this solution?

johannesschobel commented 8 years ago

Oh, and can you specifically "tag L5.2" in the headline? ;)

johannesschobel commented 8 years ago

Actually, there is already a pull request pending for this issue: See here #157