app/Http/Controllers/DeviceController.php 1 location
|
@@ 210-218 (lines=9) @@
|
| 207 |
|
* @param string $id |
| 208 |
|
* @return \Illuminate\Http\RedirectResponse |
| 209 |
|
*/ |
| 210 |
|
public function restore($id) |
| 211 |
|
{ |
| 212 |
|
$device = Device::onlyTrashed()->findOrFail($id); |
| 213 |
|
|
| 214 |
|
$device->restore(); |
| 215 |
|
|
| 216 |
|
return redirect()->route('device.show', $device->id) |
| 217 |
|
->with('success', 'Device restored successfully'); |
| 218 |
|
} |
| 219 |
|
} |
| 220 |
|
|
app/Http/Controllers/UserController.php 1 location
|
@@ 173-181 (lines=9) @@
|
| 170 |
|
* @param string $id |
| 171 |
|
* @return \Illuminate\Http\RedirectResponse |
| 172 |
|
*/ |
| 173 |
|
public function restore($id) |
| 174 |
|
{ |
| 175 |
|
$user = User::onlyTrashed()->findOrFail($id); |
| 176 |
|
|
| 177 |
|
$user->restore(); |
| 178 |
|
|
| 179 |
|
return redirect()->route('user.show', $user->id) |
| 180 |
|
->with('success', 'User restored successfully'); |
| 181 |
|
} |
| 182 |
|
} |
| 183 |
|
|