Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Spicedb Php

Spicedb Php Laravel Package

linkorb/spicedb-php

PHP client for SpiceDB, bringing fine-grained authorization to Laravel and PHP apps. Query permissions and relationships through SpiceDB's API to implement scalable, relationship-based access control.

Deep Wiki
Context7

linkorb/spicedb-php is a PHP client for SpiceDB, the Zanzibar-inspired authorization database. It helps PHP applications add fine-grained, relationship-based access control by delegating permission decisions to SpiceDB, keeping authorization logic centralized and consistent across services.

  • PHP client for interacting with a SpiceDB instance
  • Supports permission checks and relationship-based authorization workflows
  • Integrates as an authorization layer in PHP applications
  • Keeps access control centralized and easier to reason about
Frequently asked questions about Spicedb Php
What is linkorb/spicedb-php used for?
It is a PHP client library for SpiceDB, the open-source authorization database. It lets PHP applications check permissions and manage authorization relationships through a simple SDK. Use it when you want fine-grained, relationship-based access control instead of only local role checks.
How do I install linkorb/spicedb-php?
Install it with Composer using composer require linkorb/spicedb-php. Then autoload Composer dependencies and configure the client to connect to your SpiceDB instance. Check the README for the exact client configuration and connection options.
Does linkorb/spicedb-php work with Laravel?
Yes, it is a PHP package and can be added to a Laravel application as a Composer dependency. Because the context does not describe a Laravel-specific service provider, you may need to bind and configure the client yourself in a service provider. You can then inject it into controllers, policies, middleware, or services.
How do I check if a user has permission in SpiceDB from PHP?
Use the client SDK to call SpiceDB's permission-check functionality with the resource, permission, and subject you want to evaluate. SpiceDB evaluates the relationships and schema you have defined and returns whether access is allowed. Keep permission names and relationship modeling consistent with your SpiceDB schema.
Can I create and delete SpiceDB relationships with linkorb/spicedb-php?
The package is described as an SDK for managing authorization relationships as well as checking permissions. That means you can use it to write and remove relationship tuples that represent grants such as ownership, membership, or viewer access. Confirm exact method names and supported operations in the package documentation.
Do I need to run a SpiceDB server to use linkorb/spicedb-php?
Yes, linkorb/spicedb-php is a client library for SpiceDB rather than a standalone authorization engine. You need a reachable SpiceDB instance with your schema and relationships loaded. Your PHP app connects to that service to perform permission checks and relationship updates.
What Laravel or PHP versions does linkorb/spicedb-php support?
The provided context does not list exact PHP or Laravel version constraints. Check the package composer.json and README for the supported PHP version and any framework requirements. For Laravel, verify compatibility against the framework version in your application before adopting it.
How is linkorb/spicedb-php different from Laravel Gates and Policies?
Laravel Gates and Policies typically evaluate authorization inside your application using local code and data. linkorb/spicedb-php delegates relationship-based authorization decisions to a SpiceDB service. This is useful when permissions are complex, shared across services, or modeled as relationships between users, groups, and resources.
Is linkorb/spicedb-php suitable for production Laravel applications?
It can be used in production if you properly operate SpiceDB and handle network calls to it. Plan for connection security, timeouts, retries, error handling, and the availability of the SpiceDB service. Also consider caching or fallback behavior for permission checks where appropriate.
How should I test authorization logic that uses linkorb/spicedb-php?
Test against a SpiceDB instance loaded with your schema and representative relationships, ideally in an isolated test environment. Cover allowed and denied permission checks plus relationship create, update, and delete flows. You can also wrap the client behind your own interface to make it easier to mock in Laravel tests.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource