Fixed #6491 - cleaner return methods for PHP 7.3 compact()

This commit is contained in:
snipe 2018-12-12 18:23:39 -08:00
parent 4ffb8f14b8
commit ea1b792a93
8 changed files with 8 additions and 9 deletions

View file

@ -31,7 +31,7 @@ final class CompaniesController extends Controller
{
$this->authorize('view', Company::class);
return view('companies/index')->with('companies', Company::all());
return view('companies/index');
}
/**

View file

@ -34,7 +34,7 @@ class DepreciationsController extends Controller
$this->authorize('view', Depreciation::class);
// Show the page
return view('depreciations/index', compact('depreciations'));
return view('depreciations/index');
}

View file

@ -31,7 +31,7 @@ class GroupsController extends Controller
public function index()
{
// Show the page
return view('groups/index', compact('groups'));
return view('groups/index');
}
/**

View file

@ -44,7 +44,7 @@ class LocationsController extends Controller
$locations = Location::orderBy('created_at', 'DESC')->with('parent', 'assets', 'assignedassets')->get();
// Show the page
return view('locations/index', compact('locations'));
return view('locations/index');
}

View file

@ -36,7 +36,7 @@ class ManufacturersController extends Controller
public function index()
{
$this->authorize('index', Manufacturer::class);
return view('manufacturers/index', compact('manufacturers'));
return view('manufacturers/index');
}

View file

@ -33,7 +33,7 @@ class StatuslabelsController extends Controller
public function index()
{
$this->authorize('view', Statuslabel::class);
return view('statuslabels.index', compact('statuslabels'));
return view('statuslabels.index');
}
public function show($id)

View file

@ -34,10 +34,9 @@ class SuppliersController extends Controller
{
// Grab all the suppliers
$this->authorize('view', Supplier::class);
$suppliers = Supplier::orderBy('created_at', 'DESC')->get();
// Show the page
return view('suppliers/index', compact('suppliers'));
return view('suppliers/index');
}

View file

@ -73,7 +73,7 @@ class ViewAssetsController extends Controller
$assets = Asset::with('model', 'defaultLoc', 'location', 'assignedTo', 'requests')->Hardware()->RequestableAssets()->get();
$models = AssetModel::with('category', 'requests', 'assets')->RequestableModels()->get();
return view('account/requestable-assets', compact('user', 'assets', 'models'));
return view('account/requestable-assets', compact('assets', 'models'));
}