app/Http/Controllers/DeviceController.php 1 location
|
@@ 205-215 (lines=11) @@
|
202 |
|
* @param string $id |
203 |
|
* @return \Illuminate\Http\RedirectResponse |
204 |
|
*/ |
205 |
|
public function restore($id) |
206 |
|
{ |
207 |
|
$this->authorize('restore', Device::class); |
208 |
|
|
209 |
|
$device = Device::onlyTrashed()->findOrFail($id); |
210 |
|
|
211 |
|
$device->restore(); |
212 |
|
|
213 |
|
return redirect()->route('device.show', $device->id) |
214 |
|
->with('success', 'Device restored successfully'); |
215 |
|
} |
216 |
|
} |
217 |
|
|
app/Http/Controllers/UserController.php 1 location
|
@@ 178-188 (lines=11) @@
|
175 |
|
* @param string $id |
176 |
|
* @return \Illuminate\Http\RedirectResponse |
177 |
|
*/ |
178 |
|
public function restore($id) |
179 |
|
{ |
180 |
|
$this->authorize('restore', User::class); |
181 |
|
|
182 |
|
$user = User::onlyTrashed()->findOrFail($id); |
183 |
|
|
184 |
|
$user->restore(); |
185 |
|
|
186 |
|
return redirect()->route('user.show', $user->id) |
187 |
|
->with('success', 'User restored successfully'); |
188 |
|
} |
189 |
|
} |
190 |
|
|