mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Fix restore assets
This commit is contained in:
parent
6b982ec253
commit
44f7305e12
|
@ -911,14 +911,9 @@ class AssetsController extends Controller
|
||||||
return Redirect::to('hardware')->with('error', trans('general.insufficient_permissions'));
|
return Redirect::to('hardware')->with('error', trans('general.insufficient_permissions'));
|
||||||
} elseif (isset($asset->id)) {
|
} elseif (isset($asset->id)) {
|
||||||
|
|
||||||
// Restore the user
|
// Restore the asset
|
||||||
$asset->restore();
|
Asset::withTrashed()->where('id',$assetId)->restore();
|
||||||
|
return Redirect::route('hardware')->with('success', trans('admin/hardware/message.restore.success'));
|
||||||
// Prepare the success message
|
|
||||||
$success = trans('admin/hardware/message.restore.success');
|
|
||||||
|
|
||||||
// Redirect to the user management page
|
|
||||||
return Redirect::route('hardware')->with('success', $success);
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
return Redirect::to('hardware')->with('error', trans('admin/hardware/message.does_not_exist'));
|
return Redirect::to('hardware')->with('error', trans('admin/hardware/message.does_not_exist'));
|
||||||
|
|
Loading…
Reference in a new issue