Use withTrashed() to get the barcode on deleted assets
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
ca62481083
commit
fa47707974
1 changed files with 1 additions and 1 deletions
|
@ -521,7 +521,7 @@ class AssetsController extends Controller
|
||||||
public function getBarCode($assetId = null)
|
public function getBarCode($assetId = null)
|
||||||
{
|
{
|
||||||
$settings = Setting::getSettings();
|
$settings = Setting::getSettings();
|
||||||
$asset = Asset::find($assetId);
|
$asset = Asset::withTrashed()->find($assetId);
|
||||||
$barcode_file = public_path().'/uploads/barcodes/'.str_slug($settings->alt_barcode).'-'.str_slug($asset->asset_tag).'.png';
|
$barcode_file = public_path().'/uploads/barcodes/'.str_slug($settings->alt_barcode).'-'.str_slug($asset->asset_tag).'.png';
|
||||||
|
|
||||||
if (isset($asset->id, $asset->asset_tag)) {
|
if (isset($asset->id, $asset->asset_tag)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue