Files
animethemes-server/routes/dump.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

29 lines
949 B
PHP

<?php
declare(strict_types=1);
use App\Features\AllowDumpDownloading;
use App\Http\Controllers\Admin\DumpController;
use App\Http\Controllers\Admin\LatestDocumentDumpController;
use App\Http\Controllers\Admin\LatestWikiDumpController;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Str;
use Laravel\Pennant\Middleware\EnsureFeaturesAreActive;
$isDumpDownloadingAllowed = Str::of(EnsureFeaturesAreActive::class)
->append(':')
->append(AllowDumpDownloading::class)
->__toString();
Route::get('/latest/document', [LatestDocumentDumpController::class, 'show'])
->name('dump.latest.document.show')
->middleware($isDumpDownloadingAllowed);
Route::get('/latest/wiki', [LatestWikiDumpController::class, 'show'])
->name('dump.latest.wiki.show')
->middleware($isDumpDownloadingAllowed);
Route::get('/{dump}', [DumpController::class, 'show'])
->name('dump.show')
->middleware($isDumpDownloadingAllowed);