Eager load company
This commit is contained in:
parent
78343ddb7c
commit
38cdcdf064
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@ class AssetCheckoutController extends Controller
|
|||
public function create($assetId)
|
||||
{
|
||||
// Check if the asset exists
|
||||
if (is_null($asset = Asset::find(e($assetId)))) {
|
||||
if (is_null($asset = Asset::with('company')->find(e($assetId)))) {
|
||||
return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.does_not_exist'));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue