| Total Complexity | 2 |
| Total Lines | 20 |
| Duplicated Lines | 0 % |
| Coverage | 55.56% |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class SettingsController extends Controller |
||
| 11 | { |
||
| 12 | public function edit() |
||
| 13 | { |
||
| 14 | $this->authorize('update-setting'); |
||
| 15 | |||
| 16 | $settings = Setting::all(); |
||
| 17 | |||
| 18 | return view('chief::back.system.settings', compact('settings')); |
||
| 19 | } |
||
| 20 | |||
| 21 | public function update(Request $request) |
||
| 22 | { |
||
| 23 | $this->authorize('update-setting'); |
||
| 24 | |||
| 25 | app(UpdateSetting::class)->handle( |
||
| 26 | $request->get('settings') |
||
| 27 | ); |
||
| 28 | |||
| 29 | return redirect()->route('chief.back.settings.edit')->with('messages.success', 'Settings zijn aangepast!'); |
||
| 30 | } |
||
| 32 |