Comments (1)
As it stands that's the only way to do this. I'd accept a PR that adds a hasPermission
-function to the Role
model.
from laravel-permission.
Related Issues (20)
- [v5/v6] permission cache not cleared when giving permission HOT 6
- [Octane] Potential security issue by not resetting teamId? HOT 4
- Error: Call to a member function merge() on array in src\Traits\HasPermissions.php on line 348 HOT 1
- Constructor throws `User doesn't have the right permissions` but login via passport works okay. HOT 12
- Call to undefined method App\\Models\\User::hasRole() HOT 2
- [Lumen] Call to undefined method App\Models\User::canAny() HOT 6
- Default string length prerequisite conflict HOT 7
- Relation model_has_roles not found error on Role deletion HOT 13
- There is no permission named `list-users` for guard `web`. HOT 2
- Cached permissions on multiple instances running on Octane / Kubernetes HOT 12
- Access to undeclared static property Spatie\Permission\PermissionRegistrar::$pivotPermission HOT 6
- Access to undeclared static property Spatie\Permission\PermissionRegistrar::$pivotRole HOT 1
- Trait "Spatie\Permission\Traits\HasRoles" not found in app/User.php HOT 10
- php artisan permission:show uuid error HOT 1
- Typo in docs HOT 1
- Base table or view not found: 1146 Table 'role_user' doesn't exist HOT 4
- for v6 - There is no role with ID `org_uuid` for guard `api` HOT 2
- team_id doesn't have a default value HOT 5
- assignRole and syncRoles fail for model with ulid type id HOT 1
- Documentation for v6/main unaccessible at spatie.be HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-permission.