app/Http/Controllers/UserController.php 1 location
|
@@ 166-174 (lines=9) @@
|
| 163 |
|
* @param string $id |
| 164 |
|
* @return \Illuminate\Http\RedirectResponse |
| 165 |
|
*/ |
| 166 |
|
public function restore($id) |
| 167 |
|
{ |
| 168 |
|
$user = User::onlyTrashed()->findOrFail($id); |
| 169 |
|
|
| 170 |
|
$user->restore(); |
| 171 |
|
|
| 172 |
|
return redirect()->route('user.show', $user->id) |
| 173 |
|
->with('success','User restored successfully'); |
| 174 |
|
} |
| 175 |
|
} |
| 176 |
|
|
app/Http/Controllers/DeviceController.php 1 location
|
@@ 189-197 (lines=9) @@
|
| 186 |
|
* @param string $id |
| 187 |
|
* @return \Illuminate\Http\RedirectResponse |
| 188 |
|
*/ |
| 189 |
|
public function restore($id) |
| 190 |
|
{ |
| 191 |
|
$device = Device::onlyTrashed()->findOrFail($id); |
| 192 |
|
|
| 193 |
|
$device->restore(); |
| 194 |
|
|
| 195 |
|
return redirect()->route('device.show', $device->id) |
| 196 |
|
->with('success','Device restored successfully'); |
| 197 |
|
} |
| 198 |
|
} |
| 199 |
|
|