snipe-it/routes/web/components.php
2017-11-08 06:06:05 -08:00

31 lines
1 KiB
PHP

<?php
# Components
Route::group([ 'prefix' => 'components','middleware' => ['auth'] ], function () {
Route::get(
'{componentID}/checkout',
[ 'as' => 'checkout/component', 'uses' => 'ComponentsController@getCheckout' ]
);
Route::post(
'{componentID}/checkout',
[ 'as' => 'checkout/component', 'uses' => 'ComponentsController@postCheckout' ]
);
Route::get(
'{componentID}/checkin',
[ 'as' => 'checkin/component', 'uses' => 'ComponentsController@getCheckin' ]
);
Route::post(
'{componentID}/checkin',
[ 'as' => 'component.checkin.save', 'uses' => 'ComponentsController@postCheckin' ]
);
Route::post('bulk', [ 'as' => 'component/bulk-form', 'uses' => 'ComponentsController@postBulk' ]);
Route::post('bulksave', [ 'as' => 'component/bulk-save', 'uses' => 'ComponentsController@postBulkSave' ]);
});
Route::resource('components', 'ComponentsController', [
'middleware' => ['auth'],
'parameters' => ['component' => 'component_id']
]);