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

Call to undefined Method: Role::uriKey() #29

Open
StanBarrows opened this issue Dec 28, 2018 · 6 comments
Open

Call to undefined Method: Role::uriKey() #29

StanBarrows opened this issue Dec 28, 2018 · 6 comments

Comments

@StanBarrows
Copy link

StanBarrows commented Dec 28, 2018

Hey there,

I've just installed your package on an empty project to play a little around. Once I created a role I receive this error. The error only appears if I add the relation on the UserRessource. Any ideas?

BelongsToMany::make('Roles', 'roles', Role::class),

image

Set-Up:

  • Laravel Nova: v1.2.1
  • Homestead on OSX 10.14
  • MYSQL DB

Cheers,
Stan

@themazim
Copy link

themazim commented Feb 7, 2019

Hey Stan,

I ran into the same error, solution is to use use Silvanite\NovaToolPermissions\Role; instead of use Silvanite\Brandenburg\Role; in nova/User.php

Your automatic Import probably used the second one instead of the first one, as stated in the readme.

@prik
Copy link

prik commented Jul 17, 2019

The solution is referring to the Nova Role resource instead of you main model:

BelongsToMany::make('Roles', 'roles', \App\Nova\Role::class),

@paperscissors
Copy link

I had no luck with this, since this is what the docs already said to do.

I've got use Silvanite\NovaToolPermissions\Role;

and BelongsToMany::make('Roles', 'roles', Role::class), and I'm still getting this error. I've tried switching to the Brandenberg class, same issue.

The one major thing I can report is that I am using my own App\User class.

@preliot
Copy link

preliot commented Jun 11, 2020

Perhaps use php artisan vendor:publish --provider="Silvanite\NovaToolPermissions\Providers\PackageServiceProvider" ? (see docs)

@paperscissors
Copy link

I've actually followed these step by step, including the publish with the config, etc. Perhaps I will remove everything and try to install again from scratch.

@paperscissors
Copy link

No idea, I removed everything and went through the install again, the same as before and it worked. Best I can think of is that there was a single character off somewhere throwing the whole thing off, because otherwise everything was identical. Thanks!

yayann added a commit to SGS-Optimisation/novatoolpermissions that referenced this issue Jan 23, 2023
…board-isotope-integrations

updated changes for op-dashboard isotope integration
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

5 participants