|
| 1 | + |
| 2 | +[<img src="https://github-ads.s3.eu-central-1.amazonaws.com/support-ukraine.svg?t=1" />](https://supportukrainenow.org) |
| 3 | + |
| 4 | +# Dynamic feature flags for laravel. |
| 5 | + |
| 6 | +[](https://packagist.org/packages/codinglabsau/laravel-feature-flags) |
| 7 | +[](https://github.com/codinglabsau/laravel-feature-flags/actions?query=workflow%3Arun-tests+branch%3Amain) |
| 8 | +[](https://github.com/codinglabsau/laravel-feature-flags/actions?query=workflow%3A"Check+%26+fix+styling"+branch%3Amain) |
| 9 | +[](https://packagist.org/packages/codinglabsau/laravel-feature-flags) |
| 10 | + |
| 11 | +This is where your description should go. Limit it to a paragraph or two. Consider adding a small example. |
| 12 | + |
| 13 | +## Support us |
| 14 | + |
| 15 | +[<img src="https://github-ads.s3.eu-central-1.amazonaws.com/laravel-feature-flags.jpg?t=1" width="419px" />](https://spatie.be/github-ad-click/laravel-feature-flags) |
| 16 | + |
| 17 | +We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us). |
| 18 | + |
| 19 | +We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards). |
| 20 | + |
| 21 | +## Installation |
| 22 | + |
| 23 | +You can install the package via composer: |
| 24 | + |
| 25 | +```bash |
| 26 | +composer require codinglabsau/laravel-feature-flags |
| 27 | +``` |
| 28 | + |
| 29 | +You can publish and run the migrations with: |
| 30 | + |
| 31 | +```bash |
| 32 | +php artisan vendor:publish --tag="laravel-feature-flags-migrations" |
| 33 | +php artisan migrate |
| 34 | +``` |
| 35 | + |
| 36 | +You can publish the config file with: |
| 37 | + |
| 38 | +```bash |
| 39 | +php artisan vendor:publish --tag="laravel-feature-flags-config" |
| 40 | +``` |
| 41 | + |
| 42 | +This is the contents of the published config file: |
| 43 | + |
| 44 | +```php |
| 45 | +return [ |
| 46 | +]; |
| 47 | +``` |
| 48 | + |
| 49 | +Optionally, you can publish the views using |
| 50 | + |
| 51 | +```bash |
| 52 | +php artisan vendor:publish --tag="laravel-feature-flags-views" |
| 53 | +``` |
| 54 | + |
| 55 | +## Usage |
| 56 | + |
| 57 | +```php |
| 58 | +$features = new Codinglabs\FeatureFlags(); |
| 59 | +echo $features->echoPhrase('Hello, Codinglabs!'); |
| 60 | +``` |
| 61 | + |
| 62 | +## Testing |
| 63 | + |
| 64 | +```bash |
| 65 | +composer test |
| 66 | +``` |
| 67 | + |
| 68 | +## Changelog |
| 69 | + |
| 70 | +Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently. |
| 71 | + |
| 72 | +## Contributing |
| 73 | + |
| 74 | +Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details. |
| 75 | + |
| 76 | +## Security Vulnerabilities |
| 77 | + |
| 78 | +Please review [our security policy](../../security/policy) on how to report security vulnerabilities. |
| 79 | + |
| 80 | +## Credits |
| 81 | + |
| 82 | +- [Steve Thomas](https://github.com/codinglabsau) |
| 83 | +- [All Contributors](../../contributors) |
| 84 | + |
| 85 | +## License |
| 86 | + |
| 87 | +The MIT License (MIT). Please see [License File](LICENSE.md) for more information. |
0 commit comments