FleetCart/Themes/Storefront/Http/Controllers/Admin/StorefrontController.php

35 lines
919 B
PHP
Raw Normal View History

2023-06-11 12:14:03 +00:00
<?php
namespace Themes\Storefront\Http\Controllers\Admin;
use Modules\Admin\Ui\Facades\TabManager;
use Themes\Storefront\Http\Requests\SaveStorefrontRequest;
class StorefrontController
{
/**
* Show the form for editing the specified resource.
*
* @return \Illuminate\Http\Response
*/
public function edit()
{
$settings = setting()->all();
$tabs = TabManager::get('storefront');
return view('admin.storefront.edit', compact('settings', 'tabs'));
}
/**
* Update the specified resource in storage.
*
* @return \Illuminate\Http\Response
*/
public function update(SaveStorefrontRequest $request)
{
setting($request->except('_token', '_method'));
return back()->withSuccess(trans('admin::messages.resource_saved', ['resource' => trans('setting::settings.settings')]));
}
}