Files
animethemes-server/routes/video.php
T
paranarimasu 088ea287c5 feat: initial migration to pennant features for feature flags and global site config [incremental] (#573)
* feat: initial commit for feature management

* style: fix StyleCI findings

* fix(api): prohibit features of nonnull scope from API & fix(admin): wrong translate key

* style: fix Static Analysis error
2023-04-23 18:54:34 -05:00

19 lines
539 B
PHP

<?php
declare(strict_types=1);
use App\Features\AllowVideoStreams;
use App\Http\Controllers\Wiki\Video\VideoController;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Str;
use Laravel\Pennant\Middleware\EnsureFeaturesAreActive;
$isVideoStreamingAllowed = Str::of(EnsureFeaturesAreActive::class)
->append(':')
->append(AllowVideoStreams::class)
->__toString();
Route::get('/{video}', [VideoController::class, 'show'])
->name('video.show')
->middleware([$isVideoStreamingAllowed, 'record_view:video']);