spatie/laravel-permission ? reverse-engineered prompt
Reverse engineered prompt
Build me a Laravel package that lets an app manage roles and permissions for users in the database.
I want it to feel simple for a Laravel developer to use. They should be able to create permissions like edit articles, create roles like writer, give permissions directly to a user, give permissions to a role, and assign roles to users. After that, the app should be able to check if a user can do something using Laravel’s normal authorization style.
Please include the setup pieces someone would expect, like database migrations, a publishable config file, clear usage examples, and tests for the main behavior. Keep the API clean and readable, with methods that make sense in plain English, like assigning a role or giving a permission. Also add enough documentation in the README so someone can install it, run the migrations, create roles and permissions, and start checking access without guessing.
Are you gonna build this?
make sure you review the code using coderabbit