File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace App \Features ;
4+
5+ use Laravel \Pennant \Feature ;
6+
7+ class ShowAuthButtons
8+ {
9+ /**
10+ * Resolve the feature's initial value.
11+ */
12+ public function resolve (mixed $ scope ): bool
13+ {
14+ if ($ scope ) {
15+ return Feature::for (null )->active (static ::class);
16+ }
17+
18+ return false ;
19+ }
20+ }
Original file line number Diff line number Diff line change 22
33namespace App \Providers ;
44
5+ use App \Features \ShowAuthButtons ;
56use App \Support \GitHub ;
67use Illuminate \Cache \RateLimiting \Limit ;
78use Illuminate \Queue \Events \JobFailed ;
89use Illuminate \Support \Facades \Queue ;
910use Illuminate \Support \Facades \RateLimiter ;
1011use Illuminate \Support \Facades \View ;
1112use Illuminate \Support \ServiceProvider ;
13+ use Laravel \Pennant \Feature ;
1214use Sentry \State \Scope ;
1315
1416use function Sentry \captureException ;
@@ -33,6 +35,8 @@ public function boot(): void
3335
3436 $ this ->sendFailingJobsToSentry ();
3537
38+ $ this ->registerFeatureFlags ();
39+
3640 RateLimiter::for ('anystack ' , function () {
3741 return Limit::perMinute (30 );
3842 });
@@ -67,4 +71,9 @@ private function sendFailingJobsToSentry(): void
6771 }
6872 });
6973 }
74+
75+ private function registerFeatureFlags (): void
76+ {
77+ Feature::define (ShowAuthButtons::class);
78+ }
7079}
You can’t perform that action at this time.
0 commit comments