35 lines
919 B
PHP
35 lines
919 B
PHP
|
<?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')]));
|
||
|
}
|
||
|
}
|