mirror of https://github.com/4xmen/xshop.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
621 B
PHTML
27 lines
621 B
PHTML
5 months ago
|
<?php
|
||
|
|
||
|
namespace App\Http\Controllers\Admin;
|
||
|
|
||
|
use App\Http\Controllers\Controller;
|
||
|
use App\Models\Gfx;
|
||
|
use Illuminate\Http\Request;
|
||
|
|
||
|
class GfxController extends Controller
|
||
|
{
|
||
|
//
|
||
|
public function index(){
|
||
|
return view('admin.commons.gfx');
|
||
|
}
|
||
|
|
||
|
public function update( Request $request){
|
||
|
|
||
|
foreach ($request->input('gfx',[]) as $key => $gfx){
|
||
|
$g = Gfx::where('key',$key)->first();
|
||
|
$g->value = $gfx;
|
||
|
$g->save();
|
||
|
}
|
||
|
logAdmin(__METHOD__,__CLASS__,null);
|
||
|
return redirect()->back()->with(['message' => __('GFX of website updated')]);
|
||
|
}
|
||
|
}
|