mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 13:14:07 -08:00
Update all controllers to use laravel 5 return view method
This commit is contained in:
parent
a5cd4a0a22
commit
14f3868b46
|
@ -39,7 +39,7 @@ class AccessoriesController extends Controller
|
||||||
public function index(Request $request)
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
$this->authorize('index', Accessory::class);
|
$this->authorize('index', Accessory::class);
|
||||||
return View::make('accessories/index');
|
return view('accessories/index');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ class AccessoriesController extends Controller
|
||||||
{
|
{
|
||||||
$this->authorize('create', Accessory::class);
|
$this->authorize('create', Accessory::class);
|
||||||
// Show the page
|
// Show the page
|
||||||
return View::make('accessories/edit')
|
return view('accessories/edit')
|
||||||
->with('item', new Accessory)
|
->with('item', new Accessory)
|
||||||
->with('category_list', Helper::categoryList('accessory'))
|
->with('category_list', Helper::categoryList('accessory'))
|
||||||
->with('company_list', Helper::companyList())
|
->with('company_list', Helper::companyList())
|
||||||
|
@ -114,7 +114,7 @@ class AccessoriesController extends Controller
|
||||||
|
|
||||||
$this->authorize($item);
|
$this->authorize($item);
|
||||||
|
|
||||||
return View::make('accessories/edit', compact('item'))
|
return view('accessories/edit', compact('item'))
|
||||||
->with('category_list', Helper::categoryList('accessory'))
|
->with('category_list', Helper::categoryList('accessory'))
|
||||||
->with('company_list', Helper::companyList())
|
->with('company_list', Helper::companyList())
|
||||||
->with('location_list', Helper::locationsList())
|
->with('location_list', Helper::locationsList())
|
||||||
|
@ -203,7 +203,7 @@ class AccessoriesController extends Controller
|
||||||
$accessory = Accessory::find($accessoryID);
|
$accessory = Accessory::find($accessoryID);
|
||||||
$this->authorize('view', $accessory);
|
$this->authorize('view', $accessory);
|
||||||
if (isset($accessory->id)) {
|
if (isset($accessory->id)) {
|
||||||
return View::make('accessories/view', compact('accessory'));
|
return view('accessories/view', compact('accessory'));
|
||||||
}
|
}
|
||||||
// Prepare the error message
|
// Prepare the error message
|
||||||
$error = trans('admin/accessories/message.does_not_exist', compact('id'));
|
$error = trans('admin/accessories/message.does_not_exist', compact('id'));
|
||||||
|
@ -230,7 +230,7 @@ class AccessoriesController extends Controller
|
||||||
$this->authorize('checkout', $accessory);
|
$this->authorize('checkout', $accessory);
|
||||||
|
|
||||||
// Get the dropdown of users and then pass it to the checkout view
|
// Get the dropdown of users and then pass it to the checkout view
|
||||||
return View::make('accessories/checkout', compact('accessory'))->with('users_list', Helper::usersList());
|
return view('accessories/checkout', compact('accessory'))->with('users_list', Helper::usersList());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -316,7 +316,7 @@ class AccessoriesController extends Controller
|
||||||
|
|
||||||
$accessory = Accessory::find($accessory_user->accessory_id);
|
$accessory = Accessory::find($accessory_user->accessory_id);
|
||||||
$this->authorize('checkin', $accessory);
|
$this->authorize('checkin', $accessory);
|
||||||
return View::make('accessories/checkin', compact('accessory'))->with('backto', $backto);
|
return view('accessories/checkin', compact('accessory'))->with('backto', $backto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ class AssetMaintenancesController extends Controller
|
||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
return View::make('asset_maintenances/index');
|
return view('asset_maintenances/index');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ class AssetMaintenancesController extends Controller
|
||||||
] + AssetMaintenance::getImprovementOptions();
|
] + AssetMaintenance::getImprovementOptions();
|
||||||
// Mark the selected asset, if it came in
|
// Mark the selected asset, if it came in
|
||||||
// Render the view
|
// Render the view
|
||||||
return View::make('asset_maintenances/edit')
|
return view('asset_maintenances/edit')
|
||||||
->with('asset_list', Helper::detailedAssetList())
|
->with('asset_list', Helper::detailedAssetList())
|
||||||
->with('selectedAsset', request('asset_id'))
|
->with('selectedAsset', request('asset_id'))
|
||||||
->with('supplier_list', Helper::suppliersList())
|
->with('supplier_list', Helper::suppliersList())
|
||||||
|
@ -259,7 +259,7 @@ class AssetMaintenancesController extends Controller
|
||||||
|
|
||||||
// Get Supplier List
|
// Get Supplier List
|
||||||
// Render the view
|
// Render the view
|
||||||
return View::make('asset_maintenances/edit')
|
return view('asset_maintenances/edit')
|
||||||
->with('asset_list', Helper::detailedAssetList())
|
->with('asset_list', Helper::detailedAssetList())
|
||||||
->with('selectedAsset', null)
|
->with('selectedAsset', null)
|
||||||
->with('supplier_list', Helper::suppliersList())
|
->with('supplier_list', Helper::suppliersList())
|
||||||
|
@ -384,6 +384,6 @@ class AssetMaintenancesController extends Controller
|
||||||
return static::getInsufficientPermissionsRedirect();
|
return static::getInsufficientPermissionsRedirect();
|
||||||
}
|
}
|
||||||
|
|
||||||
return View::make('asset_maintenances/view')->with('assetMaintenance', $assetMaintenance);
|
return view('asset_maintenances/view')->with('assetMaintenance', $assetMaintenance);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@ class AssetModelsController extends Controller
|
||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
return View::make('models/index');
|
return view('models/index');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -53,7 +53,7 @@ class AssetModelsController extends Controller
|
||||||
public function create()
|
public function create()
|
||||||
{
|
{
|
||||||
// Show the page
|
// Show the page
|
||||||
return View::make('models/edit')
|
return view('models/edit')
|
||||||
->with('category_list', Helper::categoryList('asset'))
|
->with('category_list', Helper::categoryList('asset'))
|
||||||
->with('depreciation_list', Helper::depreciationList())
|
->with('depreciation_list', Helper::depreciationList())
|
||||||
->with('manufacturer_list', Helper::manufacturerList())
|
->with('manufacturer_list', Helper::manufacturerList())
|
||||||
|
@ -297,7 +297,7 @@ class AssetModelsController extends Controller
|
||||||
$model = AssetModel::withTrashed()->find($modelId);
|
$model = AssetModel::withTrashed()->find($modelId);
|
||||||
|
|
||||||
if (isset($model->id)) {
|
if (isset($model->id)) {
|
||||||
return View::make('models/view', compact('model'));
|
return view('models/view', compact('model'));
|
||||||
}
|
}
|
||||||
// Prepare the error message
|
// Prepare the error message
|
||||||
$error = trans('admin/models/message.does_not_exist', compact('id'));
|
$error = trans('admin/models/message.does_not_exist', compact('id'));
|
||||||
|
@ -347,7 +347,7 @@ class AssetModelsController extends Controller
|
||||||
public function getCustomFields($modelId)
|
public function getCustomFields($modelId)
|
||||||
{
|
{
|
||||||
$model = AssetModel::find($modelId);
|
$model = AssetModel::find($modelId);
|
||||||
return View::make("models.custom_fields_form")->with("model", $model);
|
return view("models.custom_fields_form")->with("model", $model);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -414,7 +414,7 @@ class AssetModelsController extends Controller
|
||||||
$manufacturer_list = $nochange + Helper::manufacturerList();
|
$manufacturer_list = $nochange + Helper::manufacturerList();
|
||||||
|
|
||||||
|
|
||||||
return View::make('models/bulk-edit', compact('models'))
|
return view('models/bulk-edit', compact('models'))
|
||||||
->with('manufacturer_list', $manufacturer_list)
|
->with('manufacturer_list', $manufacturer_list)
|
||||||
->with('category_list', $category_list)
|
->with('category_list', $category_list)
|
||||||
->with('fieldset_list', $fieldset_list)
|
->with('fieldset_list', $fieldset_list)
|
||||||
|
|
|
@ -55,7 +55,7 @@ class LoginController extends Controller
|
||||||
if (Auth::check()) {
|
if (Auth::check()) {
|
||||||
return redirect()->intended('dashboard');
|
return redirect()->intended('dashboard');
|
||||||
}
|
}
|
||||||
return View::make('auth.login');
|
return view('auth.login');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -198,7 +198,7 @@ class LoginController extends Controller
|
||||||
$user->two_factor_secret
|
$user->two_factor_secret
|
||||||
);
|
);
|
||||||
|
|
||||||
return View::make('auth.two_factor_enroll')->with('google2fa_url', $google2fa_url);
|
return view('auth.two_factor_enroll')->with('google2fa_url', $google2fa_url);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,7 +210,7 @@ class LoginController extends Controller
|
||||||
*/
|
*/
|
||||||
public function getTwoFactorAuth()
|
public function getTwoFactorAuth()
|
||||||
{
|
{
|
||||||
return View::make('auth.two_factor');
|
return view('auth.two_factor');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -38,7 +38,7 @@ class CategoriesController extends Controller
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
// Show the page
|
// Show the page
|
||||||
return View::make('categories/index');
|
return view('categories/index');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ class CategoriesController extends Controller
|
||||||
{
|
{
|
||||||
// Show the page
|
// Show the page
|
||||||
$category_types= Helper::categoryTypeList();
|
$category_types= Helper::categoryTypeList();
|
||||||
return View::make('categories/edit')->with('item', new Category)
|
return view('categories/edit')->with('item', new Category)
|
||||||
->with('category_types', $category_types);
|
->with('category_types', $category_types);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ class CategoriesController extends Controller
|
||||||
}
|
}
|
||||||
$category_types= Helper::categoryTypeList();
|
$category_types= Helper::categoryTypeList();
|
||||||
|
|
||||||
return View::make('categories/edit', compact('item'))
|
return view('categories/edit', compact('item'))
|
||||||
->with('category_types', $category_types);
|
->with('category_types', $category_types);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ class CategoriesController extends Controller
|
||||||
$category_type = $category->category_type;
|
$category_type = $category->category_type;
|
||||||
$category_type_route = $category->category_type.'s';
|
$category_type_route = $category->category_type.'s';
|
||||||
}
|
}
|
||||||
return View::make('categories/view', compact('category'))
|
return view('categories/view', compact('category'))
|
||||||
->with('category_type',$category_type)
|
->with('category_type',$category_type)
|
||||||
->with('category_type_route',$category_type_route);
|
->with('category_type_route',$category_type_route);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ final class CompaniesController extends Controller
|
||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
return View::make('companies/index')->with('companies', Company::all());
|
return view('companies/index')->with('companies', Company::all());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -39,7 +39,7 @@ final class CompaniesController extends Controller
|
||||||
*/
|
*/
|
||||||
public function create()
|
public function create()
|
||||||
{
|
{
|
||||||
return View::make('companies/edit')->with('item', new Company);
|
return view('companies/edit')->with('item', new Company);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -77,7 +77,7 @@ final class CompaniesController extends Controller
|
||||||
return redirect()->route('companies.index')
|
return redirect()->route('companies.index')
|
||||||
->with('error', trans('admin/companies/message.does_not_exist'));
|
->with('error', trans('admin/companies/message.does_not_exist'));
|
||||||
}
|
}
|
||||||
return View::make('companies/edit')->with('item', $item);
|
return view('companies/edit')->with('item', $item);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -145,7 +145,7 @@ final class CompaniesController extends Controller
|
||||||
return redirect()->route('companies.index')
|
return redirect()->route('companies.index')
|
||||||
->with('error', trans('admin/companies/message.not_found'));
|
->with('error', trans('admin/companies/message.not_found'));
|
||||||
} else {
|
} else {
|
||||||
return View::make('companies/view')->with('company',$company);
|
return view('companies/view')->with('company',$company);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ class ComponentsController extends Controller
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$this->authorize('view', Component::class);
|
$this->authorize('view', Component::class);
|
||||||
return View::make('components/index');
|
return view('components/index');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ class ComponentsController extends Controller
|
||||||
{
|
{
|
||||||
$this->authorize('create', Component::class);
|
$this->authorize('create', Component::class);
|
||||||
// Show the page
|
// Show the page
|
||||||
return View::make('components/edit')
|
return view('components/edit')
|
||||||
->with('item', new Component)
|
->with('item', new Component)
|
||||||
->with('category_list', Helper::categoryList('component'))
|
->with('category_list', Helper::categoryList('component'))
|
||||||
->with('company_list', Helper::companyList())
|
->with('company_list', Helper::companyList())
|
||||||
|
@ -123,7 +123,7 @@ class ComponentsController extends Controller
|
||||||
|
|
||||||
$this->authorize('update', $item);
|
$this->authorize('update', $item);
|
||||||
|
|
||||||
return View::make('components/edit', compact('item'))
|
return view('components/edit', compact('item'))
|
||||||
->with('category_list', Helper::categoryList('component'))
|
->with('category_list', Helper::categoryList('component'))
|
||||||
->with('company_list', Helper::companyList())
|
->with('company_list', Helper::companyList())
|
||||||
->with('location_list', Helper::locationsList());
|
->with('location_list', Helper::locationsList());
|
||||||
|
@ -215,7 +215,7 @@ class ComponentsController extends Controller
|
||||||
|
|
||||||
if (isset($component->id)) {
|
if (isset($component->id)) {
|
||||||
$this->authorize('view', $component);
|
$this->authorize('view', $component);
|
||||||
return View::make('components/view', compact('component'));
|
return view('components/view', compact('component'));
|
||||||
}
|
}
|
||||||
// Prepare the error message
|
// Prepare the error message
|
||||||
$error = trans('admin/components/message.does_not_exist', compact('id'));
|
$error = trans('admin/components/message.does_not_exist', compact('id'));
|
||||||
|
@ -240,7 +240,7 @@ class ComponentsController extends Controller
|
||||||
return redirect()->route('components.index')->with('error', trans('admin/components/message.not_found'));
|
return redirect()->route('components.index')->with('error', trans('admin/components/message.not_found'));
|
||||||
}
|
}
|
||||||
$this->authorize('checkout', $component);
|
$this->authorize('checkout', $component);
|
||||||
return View::make('components/checkout', compact('component'))->with('assets_list', Helper::detailedAssetList());
|
return view('components/checkout', compact('component'))->with('assets_list', Helper::detailedAssetList());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -40,7 +40,7 @@ class ConsumablesController extends Controller
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$this->authorize('index', Consumable::class);
|
$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);
|
$this->authorize('create', Consumable::class);
|
||||||
// Show the page
|
// Show the page
|
||||||
return View::make('consumables/edit')
|
return view('consumables/edit')
|
||||||
->with('item', new Consumable)
|
->with('item', new Consumable)
|
||||||
->with('category_list', Helper::categoryList('consumable'))
|
->with('category_list', Helper::categoryList('consumable'))
|
||||||
->with('company_list', Helper::companyList())
|
->with('company_list', Helper::companyList())
|
||||||
|
@ -121,7 +121,7 @@ class ConsumablesController extends Controller
|
||||||
|
|
||||||
$this->authorize($item);
|
$this->authorize($item);
|
||||||
|
|
||||||
return View::make('consumables/edit', compact('item'))
|
return view('consumables/edit', compact('item'))
|
||||||
->with('category_list', Helper::categoryList('consumable'))
|
->with('category_list', Helper::categoryList('consumable'))
|
||||||
->with('company_list', Helper::companyList())
|
->with('company_list', Helper::companyList())
|
||||||
->with('location_list', Helper::locationsList())
|
->with('location_list', Helper::locationsList())
|
||||||
|
@ -200,7 +200,7 @@ class ConsumablesController extends Controller
|
||||||
$consumable = Consumable::find($consumableId);
|
$consumable = Consumable::find($consumableId);
|
||||||
$this->authorize($consumable);
|
$this->authorize($consumable);
|
||||||
if (isset($consumable->id)) {
|
if (isset($consumable->id)) {
|
||||||
return View::make('consumables/view', compact('consumable'));
|
return view('consumables/view', compact('consumable'));
|
||||||
}
|
}
|
||||||
// Prepare the error message
|
// Prepare the error message
|
||||||
$error = trans('admin/consumables/message.does_not_exist', compact('id'));
|
$error = trans('admin/consumables/message.does_not_exist', compact('id'));
|
||||||
|
@ -227,7 +227,7 @@ class ConsumablesController extends Controller
|
||||||
}
|
}
|
||||||
$this->authorize('checkout', $consumable);
|
$this->authorize('checkout', $consumable);
|
||||||
// Get the dropdown of users and then pass it to the checkout view
|
// 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());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -39,7 +39,7 @@ class CustomFieldsController extends Controller
|
||||||
|
|
||||||
$fieldsets = CustomFieldset::with("fields", "models")->get();
|
$fieldsets = CustomFieldset::with("fields", "models")->get();
|
||||||
$fields = CustomField::with("fieldset")->get();
|
$fields = CustomField::with("fieldset")->get();
|
||||||
return View::make("custom_fields.index")->with("custom_fieldsets", $fieldsets)->with("custom_fields", $fields);
|
return view("custom_fields.index")->with("custom_fieldsets", $fieldsets)->with("custom_fields", $fields);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ class CustomFieldsController extends Controller
|
||||||
public function create()
|
public function create()
|
||||||
{
|
{
|
||||||
|
|
||||||
return View::make("custom_fields.fields.edit")->with('field', new CustomField());
|
return view("custom_fields.fields.edit")->with('field', new CustomField());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ class CustomFieldsController extends Controller
|
||||||
public function edit($id)
|
public function edit($id)
|
||||||
{
|
{
|
||||||
$field = CustomField::find($id);
|
$field = CustomField::find($id);
|
||||||
return View::make("custom_fields.fields.edit")->with('field', $field);
|
return view("custom_fields.fields.edit")->with('field', $field);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ class CustomFieldsetsController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return View::make("custom_fields.fieldsets.view")->with("custom_fieldset", $cfset)->with("maxid", $maxid+1)->with("custom_fields_list", $custom_fields_list);
|
return view("custom_fields.fieldsets.view")->with("custom_fieldset", $cfset)->with("maxid", $maxid+1)->with("custom_fields_list", $custom_fields_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ class CustomFieldsetsController extends Controller
|
||||||
*/
|
*/
|
||||||
public function create()
|
public function create()
|
||||||
{
|
{
|
||||||
return View::make("custom_fields.fieldsets.edit");
|
return view("custom_fields.fieldsets.edit");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ class DashboardController extends Controller
|
||||||
\Artisan::call('migrate', ['--force' => true]);
|
\Artisan::call('migrate', ['--force' => true]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return View::make('dashboard')->with('asset_stats', $asset_stats)->with('counts', $counts);
|
return view('dashboard')->with('asset_stats', $asset_stats)->with('counts', $counts);
|
||||||
} else {
|
} else {
|
||||||
// Redirect to the profile page
|
// Redirect to the profile page
|
||||||
return redirect()->intended('account/view-assets');
|
return redirect()->intended('account/view-assets');
|
||||||
|
|
|
@ -32,7 +32,7 @@ class DepreciationsController extends Controller
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
// Show the page
|
// Show the page
|
||||||
return View::make('depreciations/index', compact('depreciations'));
|
return view('depreciations/index', compact('depreciations'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ class DepreciationsController extends Controller
|
||||||
public function create()
|
public function create()
|
||||||
{
|
{
|
||||||
// Show the page
|
// Show the page
|
||||||
return View::make('depreciations/edit')->with('item', new Depreciation);
|
return view('depreciations/edit')->with('item', new Depreciation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ class DepreciationsController extends Controller
|
||||||
return redirect()->route('depreciations.index')->with('error', trans('admin/depreciations/message.does_not_exist'));
|
return redirect()->route('depreciations.index')->with('error', trans('admin/depreciations/message.does_not_exist'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return View::make('depreciations/edit', compact('item'));
|
return view('depreciations/edit', compact('item'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ class GroupsController extends Controller
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
// Show the page
|
// Show the page
|
||||||
return View::make('groups/index', compact('groups'));
|
return view('groups/index', compact('groups'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -51,7 +51,7 @@ class GroupsController extends Controller
|
||||||
$selectedPermissions = Input::old('permissions', $groupPermissions);
|
$selectedPermissions = Input::old('permissions', $groupPermissions);
|
||||||
|
|
||||||
// Show the page
|
// Show the page
|
||||||
return View::make('groups/edit', compact('permissions', 'selectedPermissions', 'groupPermissions'))->with('group', $group);
|
return view('groups/edit', compact('permissions', 'selectedPermissions', 'groupPermissions'))->with('group', $group);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -90,7 +90,7 @@ class GroupsController extends Controller
|
||||||
$permissions = config('permissions');
|
$permissions = config('permissions');
|
||||||
$groupPermissions = $group->decodePermissions();
|
$groupPermissions = $group->decodePermissions();
|
||||||
$selected_array = Helper::selectedPermissionsArray($permissions, $groupPermissions);
|
$selected_array = Helper::selectedPermissionsArray($permissions, $groupPermissions);
|
||||||
return View::make('groups.edit', compact('group', 'permissions', 'selected_array', 'groupPermissions'));
|
return view('groups.edit', compact('group', 'permissions', 'selected_array', 'groupPermissions'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -43,7 +43,7 @@ class LicensesController extends Controller
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$this->authorize('view', License::class);
|
$this->authorize('view', License::class);
|
||||||
return View::make('licenses/index');
|
return view('licenses/index');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ class LicensesController extends Controller
|
||||||
'0' => 'No'
|
'0' => 'No'
|
||||||
];
|
];
|
||||||
|
|
||||||
return View::make('licenses/edit')
|
return view('licenses/edit')
|
||||||
//->with('license_options',$license_options)
|
//->with('license_options',$license_options)
|
||||||
->with('depreciation_list', Helper::depreciationList())
|
->with('depreciation_list', Helper::depreciationList())
|
||||||
->with('supplier_list', Helper::suppliersList())
|
->with('supplier_list', Helper::suppliersList())
|
||||||
|
@ -145,7 +145,7 @@ class LicensesController extends Controller
|
||||||
'0' => 'No'
|
'0' => 'No'
|
||||||
];
|
];
|
||||||
|
|
||||||
return View::make('licenses/edit', compact('item'))
|
return view('licenses/edit', compact('item'))
|
||||||
->with('depreciation_list', Helper::depreciationList())
|
->with('depreciation_list', Helper::depreciationList())
|
||||||
->with('supplier_list', Helper::suppliersList())
|
->with('supplier_list', Helper::suppliersList())
|
||||||
->with('company_list', Helper::companyList())
|
->with('company_list', Helper::companyList())
|
||||||
|
@ -259,7 +259,7 @@ class LicensesController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->authorize('checkout', $licenseSeat);
|
$this->authorize('checkout', $licenseSeat);
|
||||||
return View::make('licenses/checkout', compact('licenseSeat'))
|
return view('licenses/checkout', compact('licenseSeat'))
|
||||||
->with('users_list', Helper::usersList())
|
->with('users_list', Helper::usersList())
|
||||||
->with('asset_list', Helper::detailedAssetList());
|
->with('asset_list', Helper::detailedAssetList());
|
||||||
}
|
}
|
||||||
|
@ -369,7 +369,7 @@ class LicensesController extends Controller
|
||||||
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.not_found'));
|
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.not_found'));
|
||||||
}
|
}
|
||||||
$this->authorize('checkin', $licenseseat);
|
$this->authorize('checkin', $licenseseat);
|
||||||
return View::make('licenses/checkin', compact('licenseseat'))->with('backto', $backTo);
|
return view('licenses/checkin', compact('licenseseat'))->with('backto', $backTo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -450,7 +450,7 @@ class LicensesController extends Controller
|
||||||
if (isset($license->id)) {
|
if (isset($license->id)) {
|
||||||
$license = $license->load('assignedusers', 'licenseSeats.user', 'licenseSeats.asset');
|
$license = $license->load('assignedusers', 'licenseSeats.user', 'licenseSeats.asset');
|
||||||
$this->authorize('view', $license);
|
$this->authorize('view', $license);
|
||||||
return View::make('licenses/view', compact('license'));
|
return view('licenses/view', compact('license'));
|
||||||
}
|
}
|
||||||
$error = trans('admin/licenses/message.does_not_exist', compact('id'));
|
$error = trans('admin/licenses/message.does_not_exist', compact('id'));
|
||||||
return redirect()->route('licenses.index')->with('error', $error);
|
return redirect()->route('licenses.index')->with('error', $error);
|
||||||
|
@ -475,7 +475,7 @@ class LicensesController extends Controller
|
||||||
$license->serial = null;
|
$license->serial = null;
|
||||||
|
|
||||||
// Show the page
|
// Show the page
|
||||||
return View::make('licenses/edit')
|
return view('licenses/edit')
|
||||||
->with('depreciation_list', Helper::depreciationList())
|
->with('depreciation_list', Helper::depreciationList())
|
||||||
->with('supplier_list', Helper::suppliersList())
|
->with('supplier_list', Helper::suppliersList())
|
||||||
->with('item', $license)
|
->with('item', $license)
|
||||||
|
|
|
@ -41,7 +41,7 @@ class LocationsController extends Controller
|
||||||
$locations = Location::orderBy('created_at', 'DESC')->with('parent', 'assets', 'assignedassets')->get();
|
$locations = Location::orderBy('created_at', 'DESC')->with('parent', 'assets', 'assignedassets')->get();
|
||||||
|
|
||||||
// Show the page
|
// Show the page
|
||||||
return View::make('locations/index', compact('locations'));
|
return view('locations/index', compact('locations'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ class LocationsController extends Controller
|
||||||
$location_options = Location::flattenLocationsArray($location_options_array);
|
$location_options = Location::flattenLocationsArray($location_options_array);
|
||||||
$location_options = array('' => 'Top Level') + $location_options;
|
$location_options = array('' => 'Top Level') + $location_options;
|
||||||
|
|
||||||
return View::make('locations/edit')
|
return view('locations/edit')
|
||||||
->with('location_options', $location_options)
|
->with('location_options', $location_options)
|
||||||
->with('item', new Location);
|
->with('item', new Location);
|
||||||
}
|
}
|
||||||
|
@ -154,7 +154,7 @@ class LocationsController extends Controller
|
||||||
$location_options = Location::flattenLocationsArray($location_options_array);
|
$location_options = Location::flattenLocationsArray($location_options_array);
|
||||||
$location_options = array('' => 'Top Level') + $location_options;
|
$location_options = array('' => 'Top Level') + $location_options;
|
||||||
|
|
||||||
return View::make('locations/edit', compact('item'))->with('location_options', $location_options);
|
return view('locations/edit', compact('item'))->with('location_options', $location_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -243,7 +243,7 @@ class LocationsController extends Controller
|
||||||
$location = Location::find($locationId);
|
$location = Location::find($locationId);
|
||||||
|
|
||||||
if (isset($location->id)) {
|
if (isset($location->id)) {
|
||||||
return View::make('locations/view', compact('location'));
|
return view('locations/view', compact('location'));
|
||||||
}
|
}
|
||||||
// Prepare the error message
|
// Prepare the error message
|
||||||
$error = trans('admin/locations/message.does_not_exist', compact('id'));
|
$error = trans('admin/locations/message.does_not_exist', compact('id'));
|
||||||
|
|
|
@ -33,7 +33,7 @@ class ManufacturersController extends Controller
|
||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
return View::make('manufacturers/index', compact('manufacturers'));
|
return view('manufacturers/index', compact('manufacturers'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ class ManufacturersController extends Controller
|
||||||
*/
|
*/
|
||||||
public function create()
|
public function create()
|
||||||
{
|
{
|
||||||
return View::make('manufacturers/edit')->with('item', new Manufacturer);
|
return view('manufacturers/edit')->with('item', new Manufacturer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ class ManufacturersController extends Controller
|
||||||
return redirect()->route('manufacturers.index')->with('error', trans('admin/manufacturers/message.does_not_exist'));
|
return redirect()->route('manufacturers.index')->with('error', trans('admin/manufacturers/message.does_not_exist'));
|
||||||
}
|
}
|
||||||
// Show the page
|
// Show the page
|
||||||
return View::make('manufacturers/edit', compact('item'));
|
return view('manufacturers/edit', compact('item'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ class ManufacturersController extends Controller
|
||||||
$manufacturer = Manufacturer::find($manufacturerId);
|
$manufacturer = Manufacturer::find($manufacturerId);
|
||||||
|
|
||||||
if (isset($manufacturer->id)) {
|
if (isset($manufacturer->id)) {
|
||||||
return View::make('manufacturers/view', compact('manufacturer'));
|
return view('manufacturers/view', compact('manufacturer'));
|
||||||
}
|
}
|
||||||
// Prepare the error message
|
// Prepare the error message
|
||||||
$error = trans('admin/manufacturers/message.does_not_exist', compact('id'));
|
$error = trans('admin/manufacturers/message.does_not_exist', compact('id'));
|
||||||
|
|
|
@ -30,7 +30,7 @@ class ProfileController extends Controller
|
||||||
{
|
{
|
||||||
$user = Auth::user();
|
$user = Auth::user();
|
||||||
$location_list = Helper::locationsList();
|
$location_list = Helper::locationsList();
|
||||||
return View::make('account/profile', compact('user'))->with('location_list', $location_list);
|
return view('account/profile', compact('user'))->with('location_list', $location_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -35,7 +35,7 @@ class ReportsController extends Controller
|
||||||
public function getAccessoryReport()
|
public function getAccessoryReport()
|
||||||
{
|
{
|
||||||
$accessories = Accessory::orderBy('created_at', 'DESC')->with('company')->get();
|
$accessories = Accessory::orderBy('created_at', 'DESC')->with('company')->get();
|
||||||
return View::make('reports/accessories', compact('accessories'));
|
return view('reports/accessories', compact('accessories'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -90,7 +90,7 @@ class ReportsController extends Controller
|
||||||
public function getAssetsReport()
|
public function getAssetsReport()
|
||||||
{
|
{
|
||||||
$settings = \App\Models\Setting::first();
|
$settings = \App\Models\Setting::first();
|
||||||
return View::make('reports/asset', compact('assets'))->with('settings', $settings);
|
return view('reports/asset', compact('assets'))->with('settings', $settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -189,7 +189,7 @@ class ReportsController extends Controller
|
||||||
$assets = Asset::with('model', 'assignedTo', 'assetstatus', 'defaultLoc', 'assetlog', 'company')
|
$assets = Asset::with('model', 'assignedTo', 'assetstatus', 'defaultLoc', 'assetlog', 'company')
|
||||||
->orderBy('created_at', 'DESC')->get();
|
->orderBy('created_at', 'DESC')->get();
|
||||||
|
|
||||||
return View::make('reports/depreciation', compact('assets'));
|
return view('reports/depreciation', compact('assets'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -281,7 +281,7 @@ class ReportsController extends Controller
|
||||||
public function getActivityReport()
|
public function getActivityReport()
|
||||||
{
|
{
|
||||||
|
|
||||||
return View::make('reports/activity');
|
return view('reports/activity');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -299,7 +299,7 @@ class ReportsController extends Controller
|
||||||
->with('company')
|
->with('company')
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
return View::make('reports/licenses', compact('licenses'));
|
return view('reports/licenses', compact('licenses'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -363,7 +363,7 @@ class ReportsController extends Controller
|
||||||
public function getCustomReport()
|
public function getCustomReport()
|
||||||
{
|
{
|
||||||
$customfields = CustomField::get();
|
$customfields = CustomField::get();
|
||||||
return View::make('reports/custom')->with('customfields', $customfields);
|
return view('reports/custom')->with('customfields', $customfields);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -636,7 +636,7 @@ class ReportsController extends Controller
|
||||||
->orderBy('created_at', 'DESC')
|
->orderBy('created_at', 'DESC')
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
return View::make('reports/asset_maintenances', compact('assetMaintenances'));
|
return view('reports/asset_maintenances', compact('assetMaintenances'));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -711,7 +711,7 @@ class ReportsController extends Controller
|
||||||
{
|
{
|
||||||
$assetsForReport = Asset::notYetAccepted()->with('company')->get();
|
$assetsForReport = Asset::notYetAccepted()->with('company')->get();
|
||||||
|
|
||||||
return View::make('reports/unaccepted_assets', compact('assetsForReport'));
|
return view('reports/unaccepted_assets', compact('assetsForReport'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -129,7 +129,7 @@ class SettingsController extends Controller
|
||||||
|
|
||||||
|
|
||||||
$start_settings['gd'] = extension_loaded('gd');
|
$start_settings['gd'] = extension_loaded('gd');
|
||||||
return View::make('setup/index')
|
return view('setup/index')
|
||||||
->with('step', 1)
|
->with('step', 1)
|
||||||
->with('start_settings', $start_settings)
|
->with('start_settings', $start_settings)
|
||||||
->with('section', 'Pre-Flight Check');
|
->with('section', 'Pre-Flight Check');
|
||||||
|
@ -224,7 +224,7 @@ class SettingsController extends Controller
|
||||||
*/
|
*/
|
||||||
public function getSetupUser()
|
public function getSetupUser()
|
||||||
{
|
{
|
||||||
return View::make('setup/user')
|
return view('setup/user')
|
||||||
->with('step', 3)
|
->with('step', 3)
|
||||||
->with('section', 'Create a User');
|
->with('section', 'Create a User');
|
||||||
}
|
}
|
||||||
|
@ -239,7 +239,7 @@ class SettingsController extends Controller
|
||||||
public function getSetupDone()
|
public function getSetupDone()
|
||||||
{
|
{
|
||||||
|
|
||||||
return View::make('setup/done')
|
return view('setup/done')
|
||||||
->with('step', 4)
|
->with('step', 4)
|
||||||
->with('section', 'Done!');
|
->with('section', 'Done!');
|
||||||
}
|
}
|
||||||
|
@ -258,7 +258,7 @@ class SettingsController extends Controller
|
||||||
Artisan::call('migrate', ['--force' => true]);
|
Artisan::call('migrate', ['--force' => true]);
|
||||||
|
|
||||||
$output = Artisan::output();
|
$output = Artisan::output();
|
||||||
return View::make('setup/migrate')
|
return view('setup/migrate')
|
||||||
->with('output', $output)
|
->with('output', $output)
|
||||||
->with('step', 2)
|
->with('step', 2)
|
||||||
->with('section', 'Create Database Tables');
|
->with('section', 'Create Database Tables');
|
||||||
|
@ -276,7 +276,7 @@ class SettingsController extends Controller
|
||||||
public function getIndex()
|
public function getIndex()
|
||||||
{
|
{
|
||||||
$settings = Setting::all();
|
$settings = Setting::all();
|
||||||
return View::make('settings/index', compact('settings'));
|
return view('settings/index', compact('settings'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -292,7 +292,7 @@ class SettingsController extends Controller
|
||||||
$setting = Setting::first();
|
$setting = Setting::first();
|
||||||
$is_gd_installed = extension_loaded('gd');
|
$is_gd_installed = extension_loaded('gd');
|
||||||
|
|
||||||
return View::make('settings/edit', compact('setting'))->with('is_gd_installed', $is_gd_installed);
|
return view('settings/edit', compact('setting'))->with('is_gd_installed', $is_gd_installed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -504,7 +504,7 @@ class SettingsController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return View::make('settings/backups', compact('path', 'files'));
|
return view('settings/backups', compact('path', 'files'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -597,7 +597,7 @@ class SettingsController extends Controller
|
||||||
if (Input::get('confirm_purge')=='DELETE') {
|
if (Input::get('confirm_purge')=='DELETE') {
|
||||||
Artisan::call('snipeit:purge', ['--force'=>'true','--no-interaction'=>true]);
|
Artisan::call('snipeit:purge', ['--force'=>'true','--no-interaction'=>true]);
|
||||||
$output = Artisan::output();
|
$output = Artisan::output();
|
||||||
return View::make('settings/purge')
|
return view('settings/purge')
|
||||||
->with('output', $output)->with('success', trans('admin/settings/message.purge.success'));
|
->with('output', $output)->with('success', trans('admin/settings/message.purge.success'));
|
||||||
} else {
|
} else {
|
||||||
return redirect()->back()->with('error', trans('admin/settings/message.purge.validation_failed'));
|
return redirect()->back()->with('error', trans('admin/settings/message.purge.validation_failed'));
|
||||||
|
|
|
@ -32,7 +32,7 @@ class StatuslabelsController extends Controller
|
||||||
|
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
return View::make('statuslabels/index', compact('statuslabels'));
|
return view('statuslabels/index', compact('statuslabels'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function show($id)
|
public function show($id)
|
||||||
|
@ -40,7 +40,7 @@ class StatuslabelsController extends Controller
|
||||||
$statuslabel = Statuslabel::find($id);
|
$statuslabel = Statuslabel::find($id);
|
||||||
|
|
||||||
if (isset($statuslabel->id)) {
|
if (isset($statuslabel->id)) {
|
||||||
return View::make('statuslabels/view', compact('statuslabel'));
|
return view('statuslabels/view', compact('statuslabel'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return redirect()->route('statuslabels.index')->with('error', trans('admin/locations/message.does_not_exist', compact('id')));
|
return redirect()->route('statuslabels.index')->with('error', trans('admin/locations/message.does_not_exist', compact('id')));
|
||||||
|
@ -60,7 +60,7 @@ class StatuslabelsController extends Controller
|
||||||
$use_statuslabel_type = $item->getStatuslabelType();
|
$use_statuslabel_type = $item->getStatuslabelType();
|
||||||
$statuslabel_types = Helper::statusTypeList();
|
$statuslabel_types = Helper::statusTypeList();
|
||||||
|
|
||||||
return View::make('statuslabels/edit', compact('statuslabel_types', 'item'))->with('use_statuslabel_type', $use_statuslabel_type);
|
return view('statuslabels/edit', compact('statuslabel_types', 'item'))->with('use_statuslabel_type', $use_statuslabel_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ class StatuslabelsController extends Controller
|
||||||
|
|
||||||
$statuslabel_types = array('' => trans('admin/hardware/form.select_statustype')) + array('undeployable' => trans('admin/hardware/general.undeployable')) + array('pending' => trans('admin/hardware/general.pending')) + array('archived' => trans('admin/hardware/general.archived')) + array('deployable' => trans('admin/hardware/general.deployable'));
|
$statuslabel_types = array('' => trans('admin/hardware/form.select_statustype')) + array('undeployable' => trans('admin/hardware/general.undeployable')) + array('pending' => trans('admin/hardware/general.pending')) + array('archived' => trans('admin/hardware/general.archived')) + array('deployable' => trans('admin/hardware/general.deployable'));
|
||||||
|
|
||||||
return View::make('statuslabels/edit', compact('item', 'statuslabel_types'))->with('use_statuslabel_type', $use_statuslabel_type);
|
return view('statuslabels/edit', compact('item', 'statuslabel_types'))->with('use_statuslabel_type', $use_statuslabel_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ class SuppliersController extends Controller
|
||||||
$suppliers = Supplier::orderBy('created_at', 'DESC')->get();
|
$suppliers = Supplier::orderBy('created_at', 'DESC')->get();
|
||||||
|
|
||||||
// Show the page
|
// Show the page
|
||||||
return View::make('suppliers/index', compact('suppliers'));
|
return view('suppliers/index', compact('suppliers'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ class SuppliersController extends Controller
|
||||||
*/
|
*/
|
||||||
public function create()
|
public function create()
|
||||||
{
|
{
|
||||||
return View::make('suppliers/edit')->with('item', new Supplier);
|
return view('suppliers/edit')->with('item', new Supplier);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ class SuppliersController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show the page
|
// Show the page
|
||||||
return View::make('suppliers/edit', compact('item'));
|
return view('suppliers/edit', compact('item'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -222,7 +222,7 @@ class SuppliersController extends Controller
|
||||||
$supplier = Supplier::find($supplierId);
|
$supplier = Supplier::find($supplierId);
|
||||||
|
|
||||||
if (isset($supplier->id)) {
|
if (isset($supplier->id)) {
|
||||||
return View::make('suppliers/view', compact('supplier'));
|
return view('suppliers/view', compact('supplier'));
|
||||||
}
|
}
|
||||||
// Prepare the error message
|
// Prepare the error message
|
||||||
$error = trans('admin/suppliers/message.does_not_exist', compact('id'));
|
$error = trans('admin/suppliers/message.does_not_exist', compact('id'));
|
||||||
|
|
|
@ -61,7 +61,7 @@ class UsersController extends Controller
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$this->authorize('index', User::class);
|
$this->authorize('index', User::class);
|
||||||
return View::make('users/index');
|
return view('users/index');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -86,7 +86,7 @@ class UsersController extends Controller
|
||||||
$userPermissions = Helper::selectedPermissionsArray($permissions, Input::old('permissions', array()));
|
$userPermissions = Helper::selectedPermissionsArray($permissions, Input::old('permissions', array()));
|
||||||
$permissions = $this->filterDisplayable($permissions);
|
$permissions = $this->filterDisplayable($permissions);
|
||||||
|
|
||||||
return View::make('users/edit', compact('groups', 'userGroups', 'permissions', 'userPermissions'))
|
return view('users/edit', compact('groups', 'userGroups', 'permissions', 'userPermissions'))
|
||||||
->with('location_list', Helper::locationsList())
|
->with('location_list', Helper::locationsList())
|
||||||
->with('manager_list', Helper::managerList())
|
->with('manager_list', Helper::managerList())
|
||||||
->with('company_list', Helper::companyList())
|
->with('company_list', Helper::companyList())
|
||||||
|
@ -254,7 +254,7 @@ class UsersController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show the page
|
// Show the page
|
||||||
return View::make('users/edit', compact('user', 'groups', 'userGroups', 'permissions', 'userPermissions'))
|
return view('users/edit', compact('user', 'groups', 'userGroups', 'permissions', 'userPermissions'))
|
||||||
->with('location_list', Helper::locationsList())
|
->with('location_list', Helper::locationsList())
|
||||||
->with('department_list', Helper::departmentList())
|
->with('department_list', Helper::departmentList())
|
||||||
->with('company_list', Helper::companyList())
|
->with('company_list', Helper::companyList())
|
||||||
|
@ -423,7 +423,7 @@ class UsersController extends Controller
|
||||||
$users = User::whereIn('id', $user_raw_array)->with('groups', 'assets', 'licenses', 'accessories')->get();
|
$users = User::whereIn('id', $user_raw_array)->with('groups', 'assets', 'licenses', 'accessories')->get();
|
||||||
if ($request->input('bulk_actions')=='edit') {
|
if ($request->input('bulk_actions')=='edit') {
|
||||||
|
|
||||||
return View::make('users/bulk-edit', compact('users'))
|
return view('users/bulk-edit', compact('users'))
|
||||||
->with('location_list', Helper::locationsList())
|
->with('location_list', Helper::locationsList())
|
||||||
->with('company_list', Helper::companyList())
|
->with('company_list', Helper::companyList())
|
||||||
->with('manager_list', Helper::managerList())
|
->with('manager_list', Helper::managerList())
|
||||||
|
@ -432,7 +432,7 @@ class UsersController extends Controller
|
||||||
->with('groups', Group::pluck('name', 'id'));
|
->with('groups', Group::pluck('name', 'id'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return View::make('users/confirm-bulk-delete', compact('users', 'statuslabel_list'));
|
return view('users/confirm-bulk-delete', compact('users', 'statuslabel_list'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -645,7 +645,7 @@ class UsersController extends Controller
|
||||||
|
|
||||||
if (isset($user->id)) {
|
if (isset($user->id)) {
|
||||||
$this->authorize('view', $user);
|
$this->authorize('view', $user);
|
||||||
return View::make('users/view', compact('user', 'userlog'));
|
return view('users/view', compact('user', 'userlog'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -729,7 +729,7 @@ class UsersController extends Controller
|
||||||
$userPermissions =Helper::selectedPermissionsArray($permissions, $clonedPermissions);
|
$userPermissions =Helper::selectedPermissionsArray($permissions, $clonedPermissions);
|
||||||
|
|
||||||
// Show the page
|
// Show the page
|
||||||
return View::make('users/edit', compact('permissions', 'userPermissions'))
|
return view('users/edit', compact('permissions', 'userPermissions'))
|
||||||
->with('location_list', Helper::locationsList())
|
->with('location_list', Helper::locationsList())
|
||||||
->with('company_list', Helper::companyList())
|
->with('company_list', Helper::companyList())
|
||||||
->with('manager_list', Helper::managerList())
|
->with('manager_list', Helper::managerList())
|
||||||
|
@ -761,7 +761,7 @@ class UsersController extends Controller
|
||||||
$permissions = config('permissions');
|
$permissions = config('permissions');
|
||||||
$selectedPermissions = Input::old('permissions', array('superuser' => -1));
|
$selectedPermissions = Input::old('permissions', array('superuser' => -1));
|
||||||
// Show the page
|
// Show the page
|
||||||
return View::make('users/import', compact('selectedGroups', 'permissions', 'selectedPermissions'));
|
return view('users/import', compact('selectedGroups', 'permissions', 'selectedPermissions'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -991,7 +991,7 @@ class UsersController extends Controller
|
||||||
return redirect()->route('users.index')->with('error', $e->getMessage());
|
return redirect()->route('users.index')->with('error', $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
return View::make('users/ldap')
|
return view('users/ldap')
|
||||||
->with('location_list', Helper::locationsList());
|
->with('location_list', Helper::locationsList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ class ViewAssetsController extends Controller
|
||||||
$userlog = $user->userlog->load('item', 'user', 'target');
|
$userlog = $user->userlog->load('item', 'user', 'target');
|
||||||
|
|
||||||
if (isset($user->id)) {
|
if (isset($user->id)) {
|
||||||
return View::make('account/view-assets', compact('user', 'userlog'));
|
return view('account/view-assets', compact('user', 'userlog'));
|
||||||
} else {
|
} else {
|
||||||
// Prepare the error message
|
// Prepare the error message
|
||||||
$error = trans('admin/users/message.user_not_found', compact('id'));
|
$error = trans('admin/users/message.user_not_found', compact('id'));
|
||||||
|
@ -71,13 +71,13 @@ class ViewAssetsController extends Controller
|
||||||
$assets = Asset::with('model', 'defaultLoc', 'assetloc', 'assignedTo')->Hardware()->RequestableAssets()->get();
|
$assets = Asset::with('model', 'defaultLoc', 'assetloc', 'assignedTo')->Hardware()->RequestableAssets()->get();
|
||||||
$models = AssetModel::with('category')->RequestableModels()->get();
|
$models = AssetModel::with('category')->RequestableModels()->get();
|
||||||
|
|
||||||
return View::make('account/requestable-assets', compact('user', 'assets', 'models'));
|
return view('account/requestable-assets', compact('user', 'assets', 'models'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getRequestedIndex()
|
public function getRequestedIndex()
|
||||||
{
|
{
|
||||||
$requestedItems = CheckoutRequest::with('user', 'requestedItem')->get();
|
$requestedItems = CheckoutRequest::with('user', 'requestedItem')->get();
|
||||||
return View::make('admin/requested-assets', compact('requestedItems'));
|
return view('admin/requested-assets', compact('requestedItems'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -280,7 +280,7 @@ class ViewAssetsController extends Controller
|
||||||
{
|
{
|
||||||
$checkoutrequests = CheckoutRequest::all();
|
$checkoutrequests = CheckoutRequest::all();
|
||||||
|
|
||||||
return View::make('account/requested-items', compact($checkoutrequests));
|
return view('account/requested-items', compact($checkoutrequests));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -314,7 +314,7 @@ class ViewAssetsController extends Controller
|
||||||
} elseif (!Company::isCurrentUserHasAccess($item)) {
|
} elseif (!Company::isCurrentUserHasAccess($item)) {
|
||||||
return redirect()->route('requestable-assets')->with('error', trans('general.insufficient_permissions'));
|
return redirect()->route('requestable-assets')->with('error', trans('general.insufficient_permissions'));
|
||||||
} else {
|
} else {
|
||||||
return View::make('account/accept-asset', compact('item'))->with('findlog', $findlog)->with('item', $item);
|
return view('account/accept-asset', compact('item'))->with('findlog', $findlog)->with('item', $item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue