snipe-it/routes/web/models.php

83 lines
1.7 KiB
PHP
Raw Normal View History

2016-12-15 06:11:03 -08:00
<?php
2021-06-10 13:17:14 -07:00
use App\Http\Controllers\AssetModelsController;
use App\Http\Controllers\BulkAssetModelsController;
use Illuminate\Support\Facades\Route;
// Asset Model Management
Route::group(['prefix' => 'models', 'middleware' => ['auth']], function () {
Route::get(
'{modelId}/clone',
[
AssetModelsController::class,
'getClone'
]
)->name('clone/model');
Route::post(
'{modelId}/clone',
[
AssetModelsController::class,
'postCreate'
]
)->name('clone/model');
Route::get(
'{modelId}/view',
[
AssetModelsController::class,
'getView'
]
)->name('view/model');
Route::get(
'{modelID}/restore',
[
AssetModelsController::class,
'getRestore'
]
)->name('restore/model');
Route::get(
'{modelId}/custom_fields',
[
AssetModelsController::class,
'getCustomFields'
]
)->name('custom_fields/model');
Route::post(
'bulkedit',
[
BulkAssetModelsController::class,
'edit'
]
)->name('models.bulkedit.index');
Route::post(
'bulksave',
[
BulkAssetModelsController::class,
'update'
]
)->name('models.bulkedit.store');
Route::post(
'bulkdelete',
[
BulkAssetModelsController::class,
'destroy'
]
)->name('models.bulkdelete.store');
2016-12-15 06:11:03 -08:00
});
2021-06-10 13:17:14 -07:00
Route::resource('models', AssetModelsController::class, [
'middleware' => ['auth'],
'parameters' => ['model' => 'model_id'],
2016-12-15 06:11:03 -08:00
]);