Giter Site home page Giter Site logo

Comments (6)

tabacitu avatar tabacitu commented on May 27, 2024 1

@mcfaith9 sounds to me like you missed a step in the installation procedure. I'm pretty sure you haven't run php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider" --tag="migrations". And yes... if the migration isn't there... it can't be run... so the interface won't work.

Please go through the installation steps one more time, make sure to run everything.

If that doesn't solve it for you, dig a little deeper to debug:

(1) Your error says Table 'project_teamwork_db.roles' doesn't exist... well ok... why? Does the table actually exist in the db - take a look? I assume it does not.

(2) Is the migration published? Take a look at database/migrations - is the roles migration file there? If not... it means you haven't published it... so you gotta run the command again.

Let us know more info, if this doesn't solve it.
Cheers!

from permissionmanager.

jcastroa87 avatar jcastroa87 commented on May 27, 2024 1

Hello, im sorry for late answer but we was going deeper on this issue.

Could you replace this instructions:

php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider" --tag="migrations"
php artisan migrate
php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider" --tag="config"
// then, add the Spatie\Permission\Traits\HasRoles trait to your User model(s)

For this:

php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider"
php artisan migrate

Let us know if work normal, if thats is the answer we will working on update instructions or make fixed in pachage.

Thanks.

from permissionmanager.

welcome avatar welcome commented on May 27, 2024

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:

  • Bug Reports, Feature Requests - Github Issues (here);
  • Quick help (How do I do X) - Gitter Chatroom;
  • Long questions (I have done X and Y and it won't do Z wtf) - Stackoverflow, using the backpack-for-laravel tag;

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

from permissionmanager.

jcastroa87 avatar jcastroa87 commented on May 27, 2024

Hi @mcfaith9,

Regarding your issue with Backpack, it is possible that the problem is related to your .env file. I recommend double-checking to ensure that your database credentials are correct. If your credentials are correct, you can try running php artisan config:clear to clear any cached configuration files.

If you continue to have issues, please provide us with more information on how you installed Backpack. This information can help us better understand the issue and provide a more accurate solution.

It would be helpful if you could provide a step-by-step explanation of how you installed Backpack. This would include any commands that you ran, any errors that you received, and any other relevant information.

We look forward to hearing back from you and helping to resolve this issue.

from permissionmanager.

rkvandervaart avatar rkvandervaart commented on May 27, 2024

Hello,

I had the same issue as mcfaith9.
Im on my first laravel project from scratch so if my think process is wrong here, pls let me know.

The issue:

  • Base table or view not found: 1146 Table 'dev.permissions' doesn't exist at ...
  • Base table or view not found: 1146 Table 'dev.roles' doesn't exist at ...

My install steps (did it 3 times by the installation steps in here to be sure):

No security vulnerability advisories found
Using version ^6.0 for backpack/permissionmanager
/var/www/app # php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider" --tag="migrations"

   INFO  No publishable resources for tag [migrations].

/var/www/app # php artisan migrate

   INFO  Nothing to migrate.

/var/www/app # php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider" --tag="config"

   INFO  No publishable resources for tag [config].

/var/www/app # php artisan vendor:publish --provider="Backpack\PermissionManager\PermissionManagerServiceProvider" --tag="config" --tag="migrations"

   INFO  Publishing [config] assets.

  Copying directory [/var/www/vendor/backpack/permissionmanager/src/config] to [config] ....................................................... DONE

   INFO  Publishing [migrations] assets.

  Copying directory [/var/www/vendor/backpack/permissionmanager/src/database/migrations] to [database/migrations] ............................. DONE

/var/www/app # php artisan migrate

   INFO  Running migrations.

  2020_03_31_114745_remove_backpackuser_model ............................................................................................. 3ms DONE

/var/www/app # php artisan migrate

   INFO  Nothing to migrate.

For me Spatie\Permission\PermissionServiceProvider is not creating the local migration files.
If i check in the verdor map, the 2 required migration files are there.

The issue is that the publish tags of spatie/laravel-permission changes, if you run:

php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider" --tag="permission-config"  --tag="permission-migrations"

Then it works:

/var/www/app # php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider" --tag="permission-config"  --tag="permission-migrations"
   INFO  Publishing [permission-config] assets.

  Copying file [/var/www/vendor/spatie/laravel-permission/config/permission.php] to [config/permission.php] ................................... DONE

   INFO  Publishing [permission-migrations] assets.

  Copying file [/var/www/vendor/spatie/laravel-permission/database/migrations/create_permission_tables.php.stub] to [database/migrations/2023_03_25_125123_create_permission_tables.php]  DONE

Hope this helps :-D

from permissionmanager.

pxpm avatar pxpm commented on May 27, 2024

This was fixed in #321

Thanks guys for the help here 🙏

Cheers

from permissionmanager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.