snipe-it/routes/web/hardware.php

151 lines
5.3 KiB
PHP
Raw Normal View History

<?php
2021-06-10 13:17:14 -07:00
use App\Http\Controllers\AssetMaintenancesController;
use App\Http\Controllers\Assets;
use Illuminate\Support\Facades\Route;
2021-06-10 13:19:27 -07:00
/*
|--------------------------------------------------------------------------
| Asset Routes
|--------------------------------------------------------------------------
|
| Register all the asset routes.
|
*/
Route::group(
['prefix' => 'hardware',
'middleware' => ['auth'], ],
function () {
Route::get('bulkaudit',
[Assets\AssetsController::class, 'quickScan']
)->name('assets.bulkaudit');
// Asset Maintenances
2021-06-10 13:17:14 -07:00
Route::resource('maintenances', AssetMaintenancesController::class, [
'parameters' => ['maintenance' => 'maintenance_id', 'asset' => 'asset_id'],
]);
Route::get('requested', [Assets\AssetsController::class, 'getRequestedIndex'])->name('assets.requested');
2017-11-02 03:11:09 -07:00
Route::get('scan',
[Assets\AssetsController::class, 'scan']
)->name('asset.scan');
Route::get('audit/due',
[Assets\AssetsController::class, 'dueForAudit']
)->name('assets.audit.due');
Route::get('audit/overdue',
[Assets\AssetsController::class, 'overdueForAudit']
)->name('assets.audit.overdue');
Route::get('audit/due',
[Assets\AssetsController::class, 'dueForAudit']
)->name('assets.audit.due');
Merge branch 'develop' into v5-master-develop-integration # Conflicts: # .env.example # .travis.yml # Dockerfile # README.md # app/Console/Commands/LdapSync.php # app/Console/Kernel.php # app/Http/Controllers/AccessoriesController.php # app/Http/Controllers/Api/AccessoriesController.php # app/Http/Controllers/Api/AssetsController.php # app/Http/Controllers/Api/LocationsController.php # app/Http/Controllers/Api/SettingsController.php # app/Http/Controllers/Api/UsersController.php # app/Http/Controllers/AssetModelsController.php # app/Http/Controllers/Assets/AssetFilesController.php # app/Http/Controllers/Assets/AssetsController.php # app/Http/Controllers/CategoriesController.php # app/Http/Controllers/CompaniesController.php # app/Http/Controllers/ComponentsController.php # app/Http/Controllers/ConsumablesController.php # app/Http/Controllers/DepartmentsController.php # app/Http/Controllers/LicensesController.php # app/Http/Controllers/LocationsController.php # app/Http/Controllers/ManufacturersController.php # app/Http/Controllers/ReportsController.php # app/Http/Controllers/SettingsController.php # app/Http/Controllers/SuppliersController.php # app/Http/Controllers/UsersController.php # app/Http/Middleware/EncryptCookies.php # app/Http/Requests/AssetRequest.php # app/Http/Transformers/AssetMaintenancesTransformer.php # app/Importer/AssetImporter.php # app/Models/AssetMaintenance.php # app/Models/Location.php # app/Models/User.php # composer.json # composer.lock # config/backup.php # config/database.php # config/version.php # public/mix-manifest.json # resources/lang/en-ID/general.php # resources/lang/vi/admin/settings/general.php # resources/views/accessories/edit.blade.php # resources/views/hardware/view.blade.php # resources/views/layouts/default.blade.php # tests/api/ApiCategoriesCest.php
2019-11-18 19:49:39 -08:00
Route::get('audit/overdue',
[Assets\AssetsController::class, 'overdueForAudit']
)->name('assets.audit.overdue');
Route::get('audit/due',
[Assets\AssetsController::class, 'dueForAudit']
)->name('assets.audit.due');
Route::get('audit/overdue',
[Assets\AssetsController::class, 'overdueForAudit']
)->name('assets.audit.overdue');
Route::get('audit/{id}',
[Assets\AssetsController::class, 'audit']
)->name('asset.audit.create');
Route::post('audit/{id}',
[Assets\AssetsController::class, 'auditStore']
)->name('asset.audit.store');
Route::get('history',
[Assets\AssetsController::class, 'getImportHistory']
)->name('asset.import-history');
Route::post('history',
[Assets\AssetsController::class, 'postImportHistory']
)->name('asset.process-import-history');
Route::get('bytag/{any?}',
[Assets\AssetsController::class, 'getAssetByTag']
)->where('any', '.*')->name('findbytag/hardware');
Route::get('byserial/{any?}',
[Assets\AssetsController::class, 'getAssetBySerial']
)->where('any', '.*')->name('findbyserial/hardware');
Route::get('{assetId}/clone',
[Assets\AssetsController::class, 'getClone']
)->name('clone/hardware');
Route::get('{assetId}/label',
[Assets\AssetsController::class, 'getLabel']
)->name('label/hardware');
Route::post('{assetId}/clone', [Assets\AssetsController::class, 'postCreate']);
Route::get('{assetId}/checkout',
[Assets\AssetCheckoutController::class, 'create']
)->name('checkout/hardware');
Route::post('{assetId}/checkout',
[Assets\AssetCheckoutController::class, 'store']
)->name('checkout/hardware');
Route::get('{assetId}/checkin/{backto?}',
[Assets\AssetCheckinController::class, 'create']
)->name('checkin/hardware');
Route::post('{assetId}/checkin/{backto?}',
[Assets\AssetCheckinController::class, 'store']
)->name('checkin/hardware');
Route::get('{assetId}/view',
[Assets\AssetsController::class, 'show']
)->name('hardware.view');
Route::get('{assetId}/qr_code', [Assets\AssetsController::class, 'getQrCode'])->name('qr_code/hardware');
Route::get('{assetId}/barcode', [Assets\AssetsController::class, 'getBarCode'])->name('barcode/hardware');
Route::get('{assetId}/restore',
[Assets\AssetsController::class, 'getRestore']
)->name('restore/hardware');
Route::post('{assetId}/upload',
[Assets\AssetFilesController::class, 'store']
)->name('upload/asset');
Route::get('{assetId}/showfile/{fileId}/{download?}',
[Assets\AssetFilesController::class, 'show']
)->name('show/assetfile');
Route::delete('{assetId}/showfile/{fileId}/delete',
[Assets\AssetFilesController::class, 'destroy']
)->name('delete/assetfile');
Route::post(
'bulkedit',
[Assets\BulkAssetsController::class, 'edit']
)->name('hardware/bulkedit');
Route::post(
'bulkdelete',
[Assets\BulkAssetsController::class, 'destroy']
)->name('hardware/bulkdelete');
Route::post(
'bulksave',
[Assets\BulkAssetsController::class, 'update']
)->name('hardware/bulksave');
// Bulk checkout / checkin
Route::get('bulkcheckout',
[Assets\BulkAssetsController::class, 'showCheckout']
)->name('hardware/bulkcheckout');
Route::post('bulkcheckout',
[Assets\BulkAssetsController::class, 'storeCheckout']
)->name('hardware/bulkcheckout');
});
2021-06-10 13:17:14 -07:00
Route::resource('hardware', Assets\AssetsController::class, [
'middleware' => ['auth'],
'parameters' => ['asset' => 'asset_id'],
]);