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

User relations not work #56

Closed
ghost opened this issue Nov 27, 2018 · 1 comment
Closed

User relations not work #56

ghost opened this issue Nov 27, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Nov 27, 2018

After follow your installation guide, if i try to see user, i obtain following error:

"message": "Too few arguments to function Laravel\Nova\Resource::__construct(), 0 passed in E:\xampp72\htdocs\logvrp\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Concerns\HasRelationships.php on line 670 and exactly 1 expected".

This is my code inside App/Nova/User.php:

public function fields(Request $request)
{
return [

        ....
        MorphToMany::make('Roles', 'roles', \Vyuldashev\NovaPermission\Role::class),
        MorphToMany::make('Permissions', 'permissions', \Vyuldashev\NovaPermission\Permission::class),
        ....
    ];
}

How can solve?

@vyuldashev
Copy link
Owner

Go through Spatie's installation guide and try again.

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

1 participant