snipe-it/routes/web/components.php
snipe 346d879344 Updated routes
Signed-off-by: snipe <snipe@snipe.net>
2021-06-12 01:05:20 -07:00

34 lines
966 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/accessory');
Route::post(
'{componentID}/checkout',
[Components\ComponentCheckoutController::class, 'store']
)->name('checkout/accessory');
Route::get(
'{componentID}/checkin/{backto?}',
[Components\ComponentCheckinController::class, 'create']
)->name('checkout/accessory');
Route::post(
'{componentID}/checkin/{backto?}',
[Components\ComponentCheckinController::class, 'store']
)->name('checkout/accessory');
});
Route::resource('components', Components\ComponentsController::class, [
'middleware' => ['auth'],
'parameters' => ['component' => 'component_id'],
]);