Comments (4)
For some reason when I used the normal Laravel Artisan seeder: php artisan db:seed
use Bouncer;
could not find the Facade, so I used:
use Silber\Bouncer\BouncerFacade as Bouncer;
and it worked a treat.
I just wanted all my seeders in the same place.
from bouncer.
Hi,
Please be sure to add
use Bouncer;
in your file so that it uses the Facade registered in IoC Service Container by Laravel.
See: https://laravel.com/docs/5.2/facades#using-facades
from bouncer.
My bad, I was trying to use "use Silber\Bouncer\Bouncer;".
Im closing this ticket.
from bouncer.
Do you know what would be really cool is if we could also check roles like this:
$user->isNot('admin|editor');
I say this because it would work really well with my Roles route middleware:
'middleware' => 'roles:admin|editor',
Just a thought :-)
Andy
from bouncer.
Related Issues (20)
- Problem with custom ability model HOT 2
- Disallow Everyone not working as expected HOT 1
- Check if a role owns a model HOT 1
- Columns 'restricted_to_id' and 'restricted_to_type', 'options' - can they be safely deleted? HOT 1
- Feature test: After calling an endpoint with json(MEHTOD, URL) that sets an ability, user->can doesn't work HOT 1
- Batch allow/disallow HOT 1
- Expiration date for assigned roles
- How can I get abilities assigned to a role and abilities directly assigned to a user (not via roles) HOT 4
- Get Model Where User Has PermissionX HOT 3
- User not getting access despite being granted role that has permission HOT 2
- Frontend - Check if user can own a model HOT 1
- Ability Options Bouncer::can not return abilities or mistake HOT 1
- Ability Cast Blocks UUID on 'entity_id' HOT 2
- Bouncer::role() return empty array HOT 2
- User::roles() returns empty collection when scope is null HOT 12
- Get Direct Abilities - Not via Roles HOT 2
- setup with filament not working HOT 1
- No migrations when upgrading from 1.0.0-rc.3 HOT 1
- Question: How can I get certain model Instance's users with ability 'update' ? HOT 1
- Can helper returning true after removing role from the user HOT 2
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 bouncer.