Fixed methods for PHP 7.3 compact()

This commit is contained in:
snipe 2018-12-12 18:16:39 -08:00
parent f91fd3c91f
commit 426dae0310
7 changed files with 8 additions and 9 deletions

View file

@ -16,7 +16,8 @@ services:
php: php:
- 7.1.3 - 7.1.3
- 7.1.4 - 7.1.4
- 7.2 - 7.2
- 7.3.0
# execute any number of scripts before the test run, custom env's are available as variables # execute any number of scripts before the test run, custom env's are available as variables

View file

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

View file

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

View file

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

View file

@ -31,10 +31,8 @@ class LocationsController extends Controller
{ {
// Grab all the locations // Grab all the locations
$this->authorize('view', Location::class); $this->authorize('view', Location::class);
$locations = Location::orderBy('created_at', 'DESC')->with('parent', 'assets', 'assignedassets')->get();
// Show the page // Show the page
return view('locations/index', compact('locations')); return view('locations/index');
} }

View file

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

View file

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