-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Silber\Bouncer\Contracts\Clipboard] is not instantiable. (Non Laravel) #354
Comments
The clipboard contract is not bound in the container. It should really be bound automatically. It's an oversight that it doesn't (when not used with Laravel). I'll fix it. For now, you can bind it yourself: use Silber\Bouncer\Contracts\Clipboard;
Container::getInstance()->instance(Clipboard::class, $bouncer->getClipboard()); |
Thanks for reply. It works. |
Keeping this open till I get to fix it. |
Ok, Thanks. |
Hi, how about pimple? It doesn't have $container[Silber\Bouncer\Contracts\Clipboard::class] = function($c) {
return $c->get('bouncer')->getClipboard();
};
$container['bouncer'] = function($c) {
$bouncer = Silber\Bouncer\Bouncer::create();
$bouncer = $bouncer->useUserModel(App\Model\User::class);
return $bouncer;
}; It was okay with rc-1. |
@dbrw If you're using Eloquent, you're already pulling in Laravel's container, so I'm not sure what you're asking, or why you'd need Pimple. |
I'm closing this for now, since the @dbrw if you still need help with anything, feel free to open a new issue. |
May i know what reason cause the code below will throw [Silber\Bouncer\Contracts\Clipboard] is not instantiable exception.
But i change this
use Silber\Bouncer\Contracts\Clipboard;
touse Silber\Bouncer\Clipboard;
in HasRoles.php then can run already. Means i need create a new HasRoles class for use?The text was updated successfully, but these errors were encountered: