Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 2 |
1 | <?php namespace jlourenco\base\Controllers; |
||
30 | public function update($id, Request $request) |
||
31 | { |
||
32 | $this->validate($request, [ 'value' => 'required' ]); |
||
33 | |||
34 | $move = Base::getSettingsRepository()->findOrFail($id); |
||
35 | |||
36 | $before = $move->value; |
||
37 | |||
38 | $move->update($request->all()); |
||
39 | |||
40 | $after = $move->value; |
||
41 | |||
42 | Base::Log('Website settings changed. Changed "' . $move->friendly_name . '" value from "' . $before . '" to "' . $after . '"'); |
||
43 | |||
44 | return redirect('admin/settings'); |
||
45 | } |
||
46 | |||
48 |