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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel

Genvoris Laravel

Latest Version on Packagist Tests PHP Version Require

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


All versions of laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
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
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package genvoris/laravel contains the following files

Loading the files please wait ...