Ignore the soft deleted assets in the eloquent query (#6824)
This commit is contained in:
parent
e3e0d57f56
commit
8c65214b1f
1 changed files with 1 additions and 1 deletions
|
@ -279,7 +279,7 @@ class AssetsController extends Controller
|
||||||
*/
|
*/
|
||||||
public function showByTag($tag)
|
public function showByTag($tag)
|
||||||
{
|
{
|
||||||
if ($asset = Asset::with('assetstatus')->with('assignedTo')->withTrashed()->where('asset_tag',$tag)->first()) {
|
if ($asset = Asset::with('assetstatus')->with('assignedTo')->where('asset_tag',$tag)->first()) {
|
||||||
$this->authorize('view', $asset);
|
$this->authorize('view', $asset);
|
||||||
return (new AssetsTransformer)->transformAsset($asset);
|
return (new AssetsTransformer)->transformAsset($asset);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue