Quickstart by stack
Laravel Quickstart
Install the Laravel integration, wire in the server key, and evaluate flags using Laravel-friendly patterns.
Prerequisites
- A Laravel application with Composer and environment configuration.
- A server key you can place in the Laravel environment file.
- One boolean flag you can use as a first rollout candidate.
composer require zenmanage/zenmanage-laravel
Environment setup
Add the server key to your Laravel environment configuration so the application can initialize the underlying Zenmanage client in the correct environment.
ZENMANAGE_SERVER_KEY=tok_your_server_key_here
use Illuminate\Http\Request;
use Zenmanage\Flags\Context\Context;
$context = Context::single('user', $request->user()->id, $request->user()->name);
$flag = app('zenmanage')->flags()
->withContext($context)
->single('new-checkout', false);
return view('checkout', ['newCheckout' => $flag->isEnabled()]);
Configuration publishing
If the package exposes publishable configuration in your app, publish it early so operations teams can see the server-key dependency clearly alongside other application configuration.
Framework-native integration
Keep flag evaluation close to the controller, service, job, or view-model that owns the decision. That keeps defaults and failure handling visible in the same place as the behavior being gated.
Instant cache refresh via webhook
By default, the SDK picks up flag changes when its local cache expires (cache_ttl). To refresh immediately instead, the package can register a built-in webhook endpoint that a Zenmanage environment webhook calls on every change. It's opt-in and off by default.
ZENMANAGE_WEBHOOK_ENABLED=true
ZENMANAGE_WEBHOOK_PATH=zenmanage/webhook
ZENMANAGE_WEBHOOK_SECRET=whsec_your_signing_secret
Publish the config with php artisan vendor:publish --tag=config if you haven't already, set the variables above, then create an environment webhook in your Zenmanage dashboard pointing at your application's URL plus the configured path (e.g., https://your-app.com/zenmanage/webhook) using the signing secret it gives you. Incoming requests are rejected with a 401 unless they carry a valid X-Zenmanage-Signature header verified against that secret.
CSRF middleware
See the webhooks reference for the event types and payloads a Zenmanage environment webhook can send.
Next step
Take the next integration step in your own stack.
Start with the quickstart that matches your runtime, then return to the reference pages when you need exact request and payload details.
Language and framework names and logos shown above are trademarks or registered trademarks of their respective owners. Their use here is for identification purposes only and does not imply endorsement of, or affiliation with, Zenmanage.