2016-12-15 06:11:03 -08:00
|
|
|
<?php
|
|
|
|
|
2021-06-10 13:17:14 -07:00
|
|
|
use App\Http\Controllers\AssetModelsController;
|
2022-06-28 15:50:07 -07:00
|
|
|
use App\Http\Controllers\AssetModelsFilesController;
|
2021-06-10 13:17:14 -07:00
|
|
|
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
|
|
|
|
2022-06-28 15:50:07 -07:00
|
|
|
Route::post('{modelID}/upload',
|
|
|
|
[AssetModelsFilesController::class, 'store']
|
|
|
|
)->name('upload/models');
|
|
|
|
|
|
|
|
Route::get('{modelID}/showfile/{fileId}/{download?}',
|
|
|
|
[AssetModelsFilesController::class, 'show']
|
|
|
|
)->name('show/modelfile');
|
|
|
|
|
|
|
|
Route::delete('{modelID}/showfile/{fileId}/delete',
|
|
|
|
[AssetModelsFilesController::class, 'destroy']
|
|
|
|
)->name('delete/modelfile');
|
|
|
|
|
2021-06-12 01:35:29 -07:00
|
|
|
Route::get(
|
|
|
|
'{modelId}/clone',
|
|
|
|
[
|
|
|
|
AssetModelsController::class,
|
|
|
|
'getClone'
|
|
|
|
]
|
2022-08-01 16:03:45 -07:00
|
|
|
)->name('models.clone.create');
|
2021-06-12 01:35:29 -07:00
|
|
|
|
|
|
|
Route::post(
|
|
|
|
'{modelId}/clone',
|
|
|
|
[
|
|
|
|
AssetModelsController::class,
|
|
|
|
'postCreate'
|
|
|
|
]
|
2022-08-01 16:03:45 -07:00
|
|
|
)->name('models.clone.store');
|
2021-06-12 01:35:29 -07:00
|
|
|
|
|
|
|
Route::get(
|
|
|
|
'{modelId}/view',
|
|
|
|
[
|
|
|
|
AssetModelsController::class,
|
|
|
|
'getView'
|
|
|
|
]
|
|
|
|
)->name('view/model');
|
|
|
|
|
2021-10-20 17:26:41 -07:00
|
|
|
Route::post(
|
2021-06-12 01:35:29 -07:00
|
|
|
'{modelID}/restore',
|
|
|
|
[
|
|
|
|
AssetModelsController::class,
|
|
|
|
'getRestore'
|
|
|
|
]
|
2022-08-01 16:03:45 -07:00
|
|
|
)->name('models.restore.store');
|
2021-06-12 01:35:29 -07:00
|
|
|
|
|
|
|
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');
|
|
|
|
|
|
|
|
|
2022-06-28 15:50:07 -07:00
|
|
|
|
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
|
|
|
]);
|