initial commit

This commit is contained in:
rsgrinko committed 2026-09-12 23:55:44 +03:00
commit 3f64f4a49a
221 files changed
+26665

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
<?php
declare(strict_types=1);
namespace Rsgrinko\Proton\Http\Middleware;
use Rsgrinko\Proton\Http\Request;
use Rsgrinko\Proton\Http\Response;
use Rsgrinko\Proton\Install\Installer;
use Rsgrinko\Proton\View\View;
/**
* Веб-установщик открыт, только пока приложение не установлено.
*
* Иначе мастером воспользовался бы любой прохожий: он пишет .env и заводит
* администратора.
*/
final class Install
{
public function __invoke(Request $request, callable $next): Response
{
if (Installer::installed()) {
return Response::redirect(View::route('home'));
}
return $next($request);
}
}