Laravel-Backpack / PermissionManager

Admin interface for managing users, roles, permissions, using Backpack CRUD
http://backpackforlaravel.com
Other
516 stars 166 forks source link

Unable to open users panel #265

Closed Deca closed 3 years ago

Deca commented 3 years ago

Bug report

What I did:

followed PermissionManager and spatie/laravel-permission, installation process

What I expected to happen:

access to the authentication/users panel

What happened:

Getting expection "The model does not exist."

What I've already tried to fix it:

tried to create a user model in vendor\backpack\permissionmanager\src\app\Models but for what I've undestood it should use by default App\Models\BackpackUser

Backpack, Laravel, PHP, DB version:

Backpack 4.1, laravel 8.1, php 7.4

welcome[bot] commented 3 years ago

Hello there! Thanks for opening your first issue on this repo!

Just a heads-up: Here at Backpack we use Github Issues only for tracking bugs. Talk about new features is also acceptable. This helps a lot in keeping our focus on improving Backpack. If you issue is not a bug/feature, please help us out by closing the issue yourself and posting in the appropriate medium (see below). If you're not sure where it fits, it's ok, a community member will probably reply to help you with that.

Backpack communication mediums:

Please keep in mind Backpack offers no official / paid support. Whatever help you receive here, on Gitter, Slack or Stackoverflow is thanks to our awesome awesome community members, who give up some of their time to help their peers. If you want to join our community, just start pitching in. We take pride in being a welcoming bunch.

Thank you!

-- Justin Case The Backpack Robot

pxpm commented 3 years ago

Hello @Deca .

You should not create files inside vendor folder. If you followed the setup tutorial you should have permission.php in your config folder.

There you can configure the user model you use in your application (In the latest Backpack versions, BackpackUser have been deprecated) so you should update your config to match your user model. (In Laravel 8, probably App\Models\User. If you cache your config don't forget to clear the cache php artisan config:clear

Don't forget to add the traits to that model (as we describe in setup documentation).

I don't think there is a bug here, so I am going to close this.

If you have any general questions like this, I suggest you to post to some other mediums, as we use github only for bugs/features.

https://gitter.im/BackpackForLaravel/Lobby https://www.reddit.com/r/BackpackForLaravel/ https://stackoverflow.com/questions/tagged/backpack-for-laravel

If I am wrong here, and I am a lot of times, please re-open.

Best, Pedro