diff --git a/Changelog.md b/Changelog.md index 22b165d..17b6735 100644 --- a/Changelog.md +++ b/Changelog.md @@ -7,6 +7,7 @@ - Dropped PHP 8.0 & PHP 8.1 Support - Dropped Laravel 9 Support +- Added the `Features` accessor class, which is a syntactic sugar for areas of the configuration ## 3.x Series diff --git a/Features.php b/Features.php new file mode 100644 index 0000000..6061426 --- /dev/null +++ b/Features.php @@ -0,0 +1,55 @@ +isEnabled(); + } + + public static function isMultiChannelDisabled(): bool + { + return self::multichannel()->isDisabled(); + } + + public static function isPricingEnabled(): bool + { + return self::pricing()->isEnabled(); + } + + public static function isPricingDisabled(): bool + { + return self::pricing()->isDisabled(); + } +} diff --git a/Features/MultiChannel.php b/Features/MultiChannel.php new file mode 100644 index 0000000..1f630d8 --- /dev/null +++ b/Features/MultiChannel.php @@ -0,0 +1,35 @@ +isEnabled(); + } + + public function configuration(): array + { + return config('vanilo.foundation.features.multi_channel', []); + } +} diff --git a/Features/Pricing.php b/Features/Pricing.php new file mode 100644 index 0000000..9a7fcf3 --- /dev/null +++ b/Features/Pricing.php @@ -0,0 +1,36 @@ +module('vanilo.pricing'); + } + + public function isDisabled(): bool + { + return !$this->isEnabled(); + } + + public function configuration(): array + { + return config('vanilo.foundation.features.pricing', []); + } +}