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
|
|
|
|
Route::group(['prefix' => 'models', 'middleware' => ['auth']], function () {
|
2021-06-10 13:17:14 -07:00
|
|
|
Route::get('{modelId}/clone', ['as' => 'clone/model', 'uses' => [AssetModelsController::class, 'getClone']]);
|
|
|
|
Route::post('{modelId}/clone', [AssetModelsController::class, 'postCreate']);
|
|
|
|
Route::get('{modelId}/view', ['as' => 'view/model', 'uses' => [AssetModelsController::class, 'getView']]);
|
|
|
|
Route::get('{modelID}/restore', ['as' => 'restore/model', 'uses' => [AssetModelsController::class, 'getRestore'], 'middleware' => ['authorize:superuser']]);
|
|
|
|
Route::get('{modelId}/custom_fields', ['as' => 'custom_fields/model', 'uses' => [AssetModelsController::class, 'getCustomFields']]);
|
|
|
|
Route::post('bulkedit', ['as' => 'models.bulkedit.index', 'uses' => [BulkAssetModelsController::class, 'edit']]);
|
|
|
|
Route::post('bulksave', ['as' => 'models.bulkedit.store', 'uses' => [BulkAssetModelsController::class, 'update']]);
|
|
|
|
Route::post('bulkdelete', ['as' => 'models.bulkdelete.store', 'uses' => [BulkAssetModelsController::class, 'destroy']]);
|
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
|
|
|
]);
|