Moved to _dev

This commit is contained in:
2025-09-20 16:11:47 +02:00
parent fb1a8753b7
commit b2ba11fcd3
1670 changed files with 224899 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
<?php
namespace Crater\Http\Middleware;
use Closure;
use Crater\Models\Setting;
class InstallationMiddleware
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
if (! \Storage::disk('local')->has('database_created')) {
return redirect('/installation');
}
if (\Storage::disk('local')->has('database_created')) {
if (Setting::getSetting('profile_complete') !== 'COMPLETED') {
return redirect('/installation');
}
}
return $next($request);
}
}