| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | public function update() |
||
| 39 | { |
||
| 40 | $validatedDate = $this->validate([ |
||
| 41 | 'site_url' => 'required|url', |
||
| 42 | 'username' => 'required|string|max:191', |
||
| 43 | 'password' => 'required', |
||
| 44 | ]); |
||
| 45 | |||
| 46 | foreach($validatedDate as $key => $item) { |
||
| 47 | $setting = Setting::firstOrNew(['key' => $key]); |
||
| 48 | $setting->value = $item; |
||
| 49 | $setting->save(); |
||
| 50 | } |
||
| 51 | |||
| 52 | $this->alert('success', 'Settings Updated Successfully.'); |
||
| 53 | } |
||
| 55 |
This check looks for private methods that have been defined, but are not used inside the class.