Skip to content

Commit

Permalink
Merge pull request #40 from Flagsmith/fix/correct-example
Browse files Browse the repository at this point in the history
fix/correct example
  • Loading branch information
dabeeeenster authored May 24, 2023
2 parents c077c5a + 4ec80d9 commit 7740f05
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions examples/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
use Slim\Views\TwigMiddleware;

require_once './vendor/autoload.php';
$env = parse_ini_file('.env');

const API_KEY = getenv('API_KEY');

$flagsmith = (new Flagsmith(API_KEY))
$flagsmith = (new Flagsmith($env['API_KEY']))
->withDefaultFlagHandler(function ($featureName) {
$defaultFlag = (new DefaultFlag())
->withEnabled(false)->withValue(null);
Expand Down

0 comments on commit 7740f05

Please sign in to comment.