1. Go to this page and download the library: Download phpdominicana/flagship library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
phpdominicana / flagship example snippets
use Flagship\Facades\Flagship;
Flagship::create('new_feature', true);
if (Flagship::isEnabled('new_feature')) {
// Code for the new feature
}
if (Flagship::isEnabled('beta_feature', auth()->user())) {
// User-specific feature
}
use PhpDominicana\Flagship\Facades\Flagship;
// Simple feature check
if (Flagship::isEnabled('new-checkout')) {
// Show new checkout flow
}
// User-specific feature check
if (Flagship::isEnabledForUser('beta-dashboard', $user)) {
// Show beta dashboard to specific user
}
// Check with fallback
$showFeature = Flagship::isEnabled('experimental-ui', false);