feat: add app and database modules

This commit is contained in:
2026-05-21 16:05:11 +07:00
parent 37b7e783f5
commit fad70d096b
212 changed files with 23901 additions and 0 deletions
@@ -0,0 +1,40 @@
<?php
namespace App\Http\Controllers\SystemSettings;
use App\Http\Controllers\Controller;
use App\Services\System\MaintenanceManagementService;
use App\Services\SystemConfig\SystemConfigService;
use Illuminate\Http\Request;
class MaintenanceModeController extends Controller
{
public function __construct(
protected SystemConfigService $systemConfig,
protected MaintenanceManagementService $maintenanceService
) {
// Middleware handled in web.php
}
public function index()
{
return view('pages.system_settings.maintenance-mode', [
'settings' => $this->systemConfig->all(),
'is_down' => $this->maintenanceService->isDown(),
]);
}
public function broadcast(Request $request)
{
$validated = $request->validate([
'minutes' => ['required', 'integer', 'min:1', 'max:60'],
]);
$this->maintenanceService->broadcastWarning($validated['minutes']);
return response()->json([
'success' => true,
'message' => __('Broadcast warning sent to all active users.'),
]);
}
}