eminiarts / nova-permissions

Laravel Nova Grouped Permissions
126 stars 65 forks source link

Create / Update Undefined In User Attach Role #27

Open jahid56 opened 5 years ago

jahid56 commented 5 years ago

I just install the package, The Package Works fine except When I go to attach role page of an user it shows Update Undefined Error, Could not find the problem Screenshot_3

Here Is My Code `

return [

    ID::make()
      ->sortable(),

    Text::make('Email')
        ->sortable()
        ->rules('required', 'email', 'max:191')
        ->creationRules('unique:users,email')
        ->updateRules('unique:users,email,{{resourceId}}'),

    Password::make('Password')
            ->onlyOnForms()
            ->creationRules('required', 'string', 'min:6')
            ->updateRules('nullable', 'string', 'min:6')
            ->hideFromIndex()
            ->hideWhenUpdating()
            ->hideFromDetail(),

    MorphToMany::make('Roles', 'roles', \Eminiarts\NovaPermissions\Nova\Role::class),

    MorphToMany::make('Permissions', 'permissions', Permission::class)
               ->hideFromDetail(),
];

`