leroy-merlin-br / laravel-optimizely
A Laravel wrapper for the Optimizely SDK
Installs: 3 436
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 31
Forks: 0
Open Issues: 0
Requires
- php: >=7.2
- ext-json: *
- illuminate/config: ^5.7.0 || ^6.0 || ^7.0|| ^8.0
- illuminate/support: ^5.7.0 || ^6.0 || ^7.0|| ^8.0
- optimizely/optimizely-sdk: ^3.9
Requires (Dev)
- mockery/mockery: ^1.4
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2022-07-07 12:24:38 UTC
README
A Laravel wrapper for the Optimizely SDK
Installation
Add the package to your project:
composer require leroy-merlin-br/laravel-optimizely
Publish the configs: `php artisan vendor:publish
Set the environment variables in your .env:
-
OPTIMIZELY_DISK
: Where the Datafile is going to be stored (we recommend in-memory storage like Redis) -
OPTIMIZELY_DATAFILE_FILEPATH
: The path where the Datafile is going to be stored, if you're using a key/value storage, this would be the key. -
OPTIMIZELY_WEBHOOK_SECRET
: The secret token that Optimizely generates for your webhook, this is used to validate incoming request and asure that it is secure, the request is going to fail otherwise
Webhook
When you publish our package using vendor:publish
a route will be created with the URI webhooks/optimizely
, Optimizely will use this route to send Datafile updates, you'll have to create a Webhook in Optimizely settings and copy the secret token to the environment
Usage
To further usage guides, go to Optimizely's PHP SDK Doc
Contributing
Just fork it :)