Current File : /home/tradevaly/public_html/app/Http/Controllers/Admin/SiteSettingController.php
<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use App\Models\Setting;
use App\Models\Logo;
use Illuminate\Http\Request;
class SiteSettingController extends Controller
{
    public function index(){
        return view('backend.pages.siteSetting.index');
    }
    public function update(Request $request)
    {
        Setting::where('name', 'maintains_mode')->update(['value' => $request->maintains_mode]);
        return back();
    }
    public function analytics(){
        return view('backend.pages.siteSetting.analytics');
    }
    public function analytics_update(Request $request)
    {
        
      $data= Logo::first();
      $data->google_analytics =$request->google_analytics;
      $data->save();
        return back();
    }
}