This commit is contained in:
deploy-bot committed 2026-12-06 12:46:53 +00:00
commit 1c8a903f24
306 files changed
+22212

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
<?php
namespace IriksIT\Manager\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use IriksIT\Manager\Support\Features;
use Symfony\Component\HttpFoundation\Response;
/** A public route of a feature: `->middleware('manager.feature:services')`. When the feature is off the page is not there. */
final class RequireFeature
{
public function handle(Request $request, Closure $next, string $feature): Response
{
abort_unless(Features::on($feature), 404);
return $next($request);
}
}