snipe-it/routes/web/components.php
snipe 250f6b6fb8 Fixed v6 bug 500 server error when trying to checkin [sc-17711]
Signed-off-by: snipe <snipe@snipe.net>
2021-11-18 14:37:12 -08:00

34 lines
970 B
PHP

<?php
use App\Http\Controllers\Components;
use Illuminate\Support\Facades\Route;
// Components
Route::group(['prefix' => 'components', 'middleware' => ['auth']], function () {
Route::get(
'{componentID}/checkout',
[Components\ComponentCheckoutController::class, 'create']
)->name('checkout/component');
Route::post(
'{componentID}/checkout',
[Components\ComponentCheckoutController::class, 'store']
)->name('checkout/component');
Route::get(
'{componentID}/checkin/{backto?}',
[Components\ComponentCheckinController::class, 'create']
)->name('checkout/component');
Route::post(
'{componentID}/checkin/{backto?}',
[Components\ComponentCheckinController::class, 'store']
)->name('component.checkin.save');
});
Route::resource('components', Components\ComponentsController::class, [
'middleware' => ['auth'],
'parameters' => ['component' => 'component_id'],
]);