Skip to content

An example app built using the DevCycle PHP SDK and the Leaf Framework

License

Notifications You must be signed in to change notification settings

DevCycleHQ-Sandbox/example-php-leaf

Repository files navigation

DevCycle PHP Server SDK Example App

An example app built using the DevCycle PHP Server SDK and the Leaf Framework

Requirements

PHP 7.3+ Composer

Creating a Demo Feature

This example app requires that your project has a feature with the expected variables, as well as some simple targeting rules.

Click here to automatically create the feature in your project ⇦

When you run the example app and switch your identity between users, you'll be able to see the feature's different variations.

Installing Composer Locally

  • php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
  • php composer-setup.php
  • php -r "unlink('composer-setup.php');"

Running the Example

Setup

  • Run php composer.phar install (local install) or composer install (global install) in the project directory to install dependencies
  • Create a .env file and set DEVCYCLE_SERVER_SDK_KEY to your Environment's SDK Key.
    You can find this under Settings > Environments on the DevCycle dashboard. Learn more about environments.

Development

php -S localhost:8000

Runs the app in the development mode. Requests may be sent to http://localhost:8000

Documentation

For more information about using the DevCycle PHP Server SDK, see the documentation

About

An example app built using the DevCycle PHP SDK and the Leaf Framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published