update marketing
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 5m14s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 17s
Build, Push and Deploy / deploy-staging (push) Successful in 41s
Build, Push and Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-05-14 11:55:22 +07:00
parent f80fcc4c1b
commit 05fd3230b8
448 changed files with 17545 additions and 5128 deletions

View File

@@ -0,0 +1,37 @@
<?php
namespace Modules\MarketingAddon\App\Http\Controllers;
use App\Models\Option;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Cache;
class AcnooSmsGatewaySettingController extends Controller
{
public function index()
{
$businessId = auth()->user()->business_id;
$sms_gateway_setting_key = 'sms-gateway-setting-' . $businessId;
$sms_gateway_setting = Option::where('key', $sms_gateway_setting_key)->first();
return view('marketingaddon::sms-gateway-settings.index', compact('sms_gateway_setting'));
}
public function store(Request $request)
{
$request->validate([
'sms_gateway_setting' => 'required|string|max:100|in:api,android',
]);
$key = 'sms-gateway-setting-' . auth()->user()->business_id;
Option::updateOrCreate(
['key' => $key],
['value' => $request->sms_gateway_setting]
);
Cache::forget($key);
return response()->json(__('SMS Gateway setting updated successfully.'));
}
}