3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-05-12 17:45:31 +00:00

Update all controllers to use laravel 5 return view method

This commit is contained in:
snipe
2017-06-09 16:44:03 -07:00
parent a5cd4a0a22
commit 14f3868b46
23 changed files with 102 additions and 102 deletions

View File

@ -40,7 +40,7 @@ class ConsumablesController extends Controller
public function index()
{
$this->authorize('index', Consumable::class);
return View::make('consumables/index');
return view('consumables/index');
}
@ -56,7 +56,7 @@ class ConsumablesController extends Controller
{
$this->authorize('create', Consumable::class);
// Show the page
return View::make('consumables/edit')
return view('consumables/edit')
->with('item', new Consumable)
->with('category_list', Helper::categoryList('consumable'))
->with('company_list', Helper::companyList())
@ -121,7 +121,7 @@ class ConsumablesController extends Controller
$this->authorize($item);
return View::make('consumables/edit', compact('item'))
return view('consumables/edit', compact('item'))
->with('category_list', Helper::categoryList('consumable'))
->with('company_list', Helper::companyList())
->with('location_list', Helper::locationsList())
@ -200,7 +200,7 @@ class ConsumablesController extends Controller
$consumable = Consumable::find($consumableId);
$this->authorize($consumable);
if (isset($consumable->id)) {
return View::make('consumables/view', compact('consumable'));
return view('consumables/view', compact('consumable'));
}
// Prepare the error message
$error = trans('admin/consumables/message.does_not_exist', compact('id'));
@ -227,7 +227,7 @@ class ConsumablesController extends Controller
}
$this->authorize('checkout', $consumable);
// Get the dropdown of users and then pass it to the checkout view
return View::make('consumables/checkout', compact('consumable'))->with('users_list', Helper::usersList());
return view('consumables/checkout', compact('consumable'))->with('users_list', Helper::usersList());
}
/**