mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
Implement feature flags and update views
This commit implements feature flags using the "ylsideas/feature-flags" library and updates various frontend views to show or hide sections based on the feature flag. Additionally, a new migration file is created for the features database table and the LibraryItem model is updated with a new searchLibraryItems function. The composer.json and composer.lock files are updated to include the new dependencies.
This commit is contained in:
51
config/features.php
Normal file
51
config/features.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Pipeline
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The pipeline for the feature to travel through.
|
||||
|
|
||||
*/
|
||||
|
||||
'pipeline' => ['database', 'in_memory'],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Gateways
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Configures the different gateway options
|
||||
|
|
||||
*/
|
||||
|
||||
'gateways' => [
|
||||
'in_memory' => [
|
||||
'file' => env('FEATURE_FLAG_IN_MEMORY_FILE', '.features.php'),
|
||||
'driver' => 'in_memory',
|
||||
],
|
||||
'database' => [
|
||||
'driver' => 'database',
|
||||
'cache' => [
|
||||
'ttl' => 600,
|
||||
],
|
||||
'connection' => env('FEATURE_FLAG_DATABASE_CONNECTION'),
|
||||
'table' => env('FEATURE_FLAG_DATABASE_TABLE', 'features'),
|
||||
],
|
||||
'gate' => [
|
||||
'driver' => 'gate',
|
||||
'gate' => env('FEATURE_FLAG_GATE_GATE', 'feature'),
|
||||
'guard' => env('FEATURE_FLAG_GATE_GUARD'),
|
||||
'cache' => [
|
||||
'ttl' => 600,
|
||||
],
|
||||
],
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'prefix' => env('FEATURE_FLAG_REDIS_PREFIX', 'features'),
|
||||
'connection' => env('FEATURE_FLAG_REDIS_CONNECTION', 'default'),
|
||||
],
|
||||
],
|
||||
];
|
||||
Reference in New Issue
Block a user