first change

This commit is contained in:
2025-07-27 17:40:56 +05:45
commit f8b9a6725b
3152 changed files with 229528 additions and 0 deletions

View File

@@ -0,0 +1,84 @@
<?php
namespace Modules\CCMS\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cache;
use Modules\CCMS\Models\Setting;
class SettingController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
return view('ccms::setting.index', [
'editable' => true,
'title' => 'Edit Setting',
]);
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request)
{
$request->mergeIfMissing([
'enable_reCaptcha' => 0,
]);
$input = $request->except(['_token', '_method']);
foreach ($input as $key => $value) {
Setting::updateOrCreate(
['key' => $key],
['value' => $value]
);
}
Cache::forget('setting');
return to_route('setting.index')->with('success', 'Setting have been updated!');
}
/**
* Show the specified resource.
*/
public function show($id)
{
//
}
/**
* Show the form for editing the specified resource.
*/
public function edit($id)
{
//
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, $id)
{
//
}
/**
* Remove the specified resource from storage.
*/
public function destroy($id)
{
//
}
}