Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attachRole does not working #22

Closed
osette opened this issue Jan 6, 2017 · 6 comments
Closed

attachRole does not working #22

osette opened this issue Jan 6, 2017 · 6 comments

Comments

@osette
Copy link

osette commented Jan 6, 2017

I have existing role, and I'm trying to save that role to user
$user = User::find(1);//working
$role = Role::where('id', '=', 1)->first();//working
$user->attachRole($role);

@ajmerainfo
Copy link
Collaborator

@osette

Can you share your error or what you getting wrong?

@sektibayu
Copy link

@ajmerainfo

I have same issue and this is the error message
[Sympony\Component\Debug\Exception\FatalThrowableError] Class name must be a valid object or a string

this is my full code
AdminSeeder.txt
ntrust.txt

@ajmerainfo
Copy link
Collaborator

ajmerainfo commented Jan 6, 2017

Can you please try with attach ntrust file?
Also if still not work then can you please share your detail like php version, laravel version and are you using vagrant or something else?

ntrust.txt

@sektibayu
Copy link

it still didn't work
my php version is 7.0.13, laravel version is 5.3.28, and for server i just using localhost xampp in windows

@ajmerainfo
Copy link
Collaborator

@sektibayu

It would be great if you can share your code with me then I can do more trobalshoot.

@sektibayu
Copy link

sorry. now i know it's my fault when i install it. thanks for your help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants