Download the PHP package genvoris/laravel without Composer
On this page you can find all versions of the php package genvoris/laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download genvoris/laravel
More information about genvoris/laravel
Files in genvoris/laravel
Package laravel
Short Description Official Laravel package for Genvoris Virtual Try-On
License MIT
Homepage https://docs.genvoris.org
Informations about the package laravel
Genvoris Laravel
Official Laravel integration for the Genvoris Virtual Try-On platform.
Add virtual try-on experiences to your Laravel application in minutes: upsert customers, mint session tokens, proxy widget requests server-side, and handle webhooks — all with zero client-side API key exposure.
Requirements
| Dependency | Version |
|---|---|
| PHP | ^8.1 |
| Laravel | ^10.0 | ^11.0 | ^12.0 |
Installation
Run the install command to publish config and add .env keys:
Add your keys to .env:
Verify the connection:
Configuration
The published config/genvoris.php file exposes all options. The most important:
| Key | Env var | Default | Description |
|---|---|---|---|
api_key |
GENVORIS_API_KEY |
"" |
Your platform API key |
api_base_url |
GENVORIS_API_URL or GENVORIS_API_BASE_URL |
https://genvoris.org/api/v1 |
Portal API base for server SDK calls |
timeout |
GENVORIS_TIMEOUT |
30 |
HTTP timeout (seconds) |
retry.times |
— | 3 |
Max retries on 429 / 5xx |
webhook.secret |
GENVORIS_WEBHOOK_SECRET |
"" |
HMAC secret for signatures |
webhook.path |
GENVORIS_WEBHOOK_PATH |
webhooks/genvoris |
Route prefix |
webhook.auto_register |
— | true |
Auto-register webhook route |
proxy.path |
GENVORIS_PROXY_PATH |
genvoris-proxy |
Route prefix |
proxy.upstream |
GENVORIS_PROXY_UPSTREAM, GENVORIS_TRYON_UPSTREAM, or TRYON_BACKEND_URL |
https://api.genvoris.org |
Try-on/widget upstream for proxied browser calls |
proxy.auto_register |
— | true |
Auto-register proxy route |
proxy.allowed_paths |
— | [api/analyze, api/tryon, api/config, api/status, api/v1/events] |
Strict forwarding allowlist |
proxy.events_path |
— | api/v1/events |
Widget analytics path forwarded with server-side API key |
external_id_prefix |
GENVORIS_EXTERNAL_ID_PREFIX |
laravel_ |
Prefix on external customer IDs |
widget_url |
GENVORIS_WIDGET_URL |
https://api.genvoris.org/widget.js |
Widget script URL |
cache.sessions |
— | true |
Cache minted session tokens |
cache.ttl |
— | 840 |
Session cache TTL (seconds) |
Basic Usage
Facade
Dependency injection
HasGenvorisAccess Trait
Add the trait to your User model (or any Eloquent model) to get Genvoris helpers:
Available methods:
Optional local cache table
Run the optional migration to cache customer IDs and avoid repeated API calls:
Blade Directives
Or use the Blade views directly:
The rendered script includes data-api-url, data-events-url, data-platform="laravel", and customer token attributes for the hosted widget. Your GENVORIS_API_KEY is never printed into HTML.
Webhooks
Register your endpoint in the Genvoris dashboard:
The package auto-registers this route and verifies the HMAC-SHA256 signature on every request.
Listening to events
Or declare listeners in config/genvoris.php:
Supported event types
| Event type | PHP class |
|---|---|
tryon.completed |
TryOnCompleted |
tryon.failed |
TryOnFailed |
customer.plan_changed |
CustomerPlanChanged |
customer.quota_exhausted |
CustomerQuotaExhausted |
credit.low_balance |
CreditLowBalance |
credit.balance_added |
CreditBalanceAdded |
end_customer.created |
CustomerCreated |
end_customer.updated |
CustomerUpdated |
end_customer.cancelled |
CustomerCancelled |
end_customer.quota_warning |
CustomerQuotaWarning |
end_customer.quota_exhausted |
CustomerQuotaExhausted |
end_customer.period_rolled |
CustomerPeriodRolled |
plan.created |
PlanCreated |
plan.updated |
PlanUpdated |
plan.disabled |
PlanDisabled |
All event classes are in the Genvoris\Laravel\Webhooks\Events namespace.
Manual verification
Proxy
The package registers /genvoris-proxy/{path} for GET, POST, PUT, PATCH, DELETE, and OPTIONS. It injects your API key server-side before forwarding to api.genvoris.org. Only paths in the proxy.allowed_paths allowlist are forwarded, including api/v1/events for hosted widget analytics.
The hosted widget should call the same-origin proxy, not the Genvoris upstream directly from the browser:
@genvorisScripts and @genvorisWidget emit this automatically. The browser receives only the same-origin proxy URL and short-lived customer token; the merchant API key stays in .env.
Artisan Commands
| Command | Description |
|---|---|
genvoris:install |
Publish config, views, migration; add .env keys |
genvoris:test-connection |
Verify API key by listing plans |
genvoris:list-plans |
Display plan table |
genvoris:list-customers |
Display customer table (--limit, --page) |
genvoris:webhook-test |
Send a signed test webhook to your endpoint |
Testing
Install dev dependencies and run the suite:
For a consuming Laravel app, clear cached config/routes after upgrading:
Run code style checks:
Changelog
See CHANGELOG.md for a list of changes.
Contributing
Bug reports and pull requests are welcome at the project's GitHub repository.
Before submitting a PR, please run composer test and composer lint:check.
License
MIT — see LICENSE.
Support
- Docs: https://docs.genvoris.org
- Email: [email protected]
All versions of laravel with dependencies
illuminate/cache Version ^10.0|^11.0|^12.0
illuminate/contracts Version ^10.0|^11.0|^12.0
illuminate/console Version ^10.0|^11.0|^12.0
illuminate/database Version ^10.0|^11.0|^12.0
illuminate/http Version ^10.0|^11.0|^12.0
illuminate/support Version ^10.0|^11.0|^12.0