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;
|
|
|
|
|
2021-06-10 13:15:52 -07:00
|
|
|
// Asset Model Management
|
2021-06-12 01:35:29 -07:00
|
|
|
|
|
|
|
|
2021-06-10 13:15:52 -07:00
|
|
|
Route::group(['prefix' => 'models', 'middleware' => ['auth']], function () {
|
2021-06-12 01:35:29 -07:00
|
|
|
|
|
|
|
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, [
|
2017-03-11 05:16:56 -08:00
|
|
|
'middleware' => ['auth'],
|
2021-06-10 13:15:52 -07:00
|
|
|
'parameters' => ['model' => 'model_id'],
|
2016-12-15 06:11:03 -08:00
|
|
|
]);
|