snipe-it/routes/web/kits.php

137 lines
3.4 KiB
PHP
Raw Normal View History

2018-10-19 07:30:25 -07:00
<?php
// Predefined Kit Management
2018-10-31 06:06:38 -07:00
Route::resource('kits', 'Kits\PredefinedKitsController', [
2018-10-19 07:30:25 -07:00
'middleware' => ['auth'],
'parameters' => ['kit' => 'kit_id']
]);
Route::group([ 'prefix' => 'kits/{kit_id}', 'middleware' => ['auth'] ], function () {
2018-10-31 06:06:38 -07:00
// Route::get('licenses',
// [
// 'as' => 'kits.licenses.index',
// 'uses' => 'Kits\PredefinedKitsController@indexLicenses',
// ]
// );
2018-10-19 07:30:25 -07:00
Route::post('licenses',
[
'as' => 'kits.licenses.store',
'uses' => 'Kits\PredefinedKitsController@storeLicense',
]
);
Route::put('licenses/{license_id}',
[
'as' => 'kits.licenses.update',
'uses' => 'Kits\PredefinedKitsController@updateLicense',
]
);
Route::get('licenses/{license_id}/edit',
[
'as' => 'kits.licenses.edit',
'uses' => 'Kits\PredefinedKitsController@editLicense',
]
);
2018-10-19 07:30:25 -07:00
Route::delete('licenses/{license_id}',
[
2018-10-31 06:06:38 -07:00
'as' => 'kits.licenses.detach',
'uses' => 'Kits\PredefinedKitsController@detachLicense',
2018-10-19 07:30:25 -07:00
]
);
2018-10-19 07:30:25 -07:00
// Models
2018-10-19 07:30:25 -07:00
Route::put('models/{model_id}',
[
'as' => 'kits.models.update',
'uses' => 'Kits\PredefinedKitsController@updateModel',
'parameters' => [2 => 'kit_id', 1 => 'model_id']
2018-10-19 07:30:25 -07:00
]
);
2018-10-31 06:06:38 -07:00
Route::get('models/{model_id}/edit',
[
'as' => 'kits.models.edit',
'uses' => 'Kits\PredefinedKitsController@editModel',
2018-10-31 06:06:38 -07:00
]
);
2018-10-19 07:30:25 -07:00
Route::delete('models/{model_id}',
[
2018-10-31 06:06:38 -07:00
'as' => 'kits.models.detach',
'uses' => 'Kits\PredefinedKitsController@detachModel',
2018-10-19 07:30:25 -07:00
]
);
// Consumables
Route::put('consumables/{consumable_id}',
[
'as' => 'kits.consumables.update',
'uses' => 'Kits\PredefinedKitsController@updateConsumable',
'parameters' => [2 => 'kit_id', 1 => 'consumable_id']
]
);
Route::get('consumables/{consumable_id}/edit',
[
'as' => 'kits.consumables.edit',
'uses' => 'Kits\PredefinedKitsController@editConsumable',
]
);
Route::delete('consumables/{consumable_id}',
[
'as' => 'kits.consumables.detach',
'uses' => 'Kits\PredefinedKitsController@detachConsumable',
]
);
// Accessories
Route::put('accessories/{accessory_id}',
[
'as' => 'kits.accessories.update',
'uses' => 'Kits\PredefinedKitsController@updateAccessory',
'parameters' => [2 => 'kit_id', 1 => 'accessory_id']
]
);
Route::get('accessories/{accessory_id}/edit',
[
'as' => 'kits.accessories.edit',
'uses' => 'Kits\PredefinedKitsController@editAccessory',
]
);
Route::delete('accessories/{accessory_id}',
[
'as' => 'kits.accessories.detach',
'uses' => 'Kits\PredefinedKitsController@detachAccessory',
]
);
2018-11-13 09:33:32 -08:00
Route::get('checkout',
[
'as' => 'kits.checkout.show',
'uses' => 'Kits\CheckoutKitController@showCheckout',
]
);
Route::post('checkout',
[
'as' => 'kits.checkout.store',
'uses' => 'Kits\CheckoutKitController@store',
]
);
2018-10-19 07:30:25 -07:00
}); // kits