roles icon indicating copy to clipboard operation
roles copied to clipboard

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

Open mahmoud-birdsol opened this issue 9 years ago • 3 comments

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

mahmoud-birdsol avatar Aug 01 '16 16:08 mahmoud-birdsol

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

johannesschobel avatar Aug 08 '16 15:08 johannesschobel

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

johannesschobel avatar Aug 08 '16 15:08 johannesschobel

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

johannesschobel avatar Aug 08 '16 15:08 johannesschobel