phpvms/app/Http/Controllers/Admin/SettingsController.php

45 lines
979 B
PHP
Raw Normal View History

2017-06-21 07:49:45 +08:00
<?php
namespace App\Http\Controllers\Admin;
use Illuminate\Http\Request;
use Setting;
2017-06-21 07:49:45 +08:00
class SettingsController extends BaseController
{
2017-06-21 11:48:16 +08:00
/**
* Display a listing of setting.
*
* @return Response
*/
public function index()
{
/*$settings = array_filter(Setting::all(), function ($key) {
2017-06-21 11:48:16 +08:00
if (strpos($key, '_descrip') !== false) { return true; }
return false;
});*/
$settings = [];
2017-06-21 11:48:16 +08:00
return view('admin.settings.index',[
'settings' => $settings,
]);
2017-06-21 11:48:16 +08:00
}
/**
* Update the specified setting in storage.
*
* @param Setting $setting
* @param Request $request
*
2017-06-21 07:49:45 +08:00
* @return Response
*/
public function update(Setting $setting, Request $request)
2017-06-21 11:48:16 +08:00
{
/*$this->validate($request, Setting::$rules, Setting::$messages);
$this->updateEntry($setting, $request->all());*/
2017-06-21 07:49:45 +08:00
return redirect('/admin/settings');
2017-06-21 11:48:16 +08:00
}
2017-06-21 07:49:45 +08:00
}