snipe-it/routes/web/accessories.php
snipe 4a4636bd03 Handle accessories route names
Signed-off-by: snipe <snipe@snipe.net>
2022-08-01 16:06:28 -07:00

36 lines
1,010 B
PHP

<?php
use App\Http\Controllers\Accessories;
use Illuminate\Support\Facades\Route;
/*
* Accessories
*/
Route::group(['prefix' => 'accessories', 'middleware' => ['auth']], function () {
Route::get(
'{accessoryID}/checkout',
[Accessories\AccessoryCheckoutController::class, 'create']
)->name('accessories.checkout.show');
Route::post(
'{accessoryID}/checkout',
[Accessories\AccessoryCheckoutController::class, 'store']
)->name('accessories.checkout.store');
Route::get(
'{accessoryID}/checkin/{backto?}',
[Accessories\AccessoryCheckinController::class, 'create']
)->name('accessories.checkin.show');
Route::post(
'{accessoryID}/checkin/{backto?}',
[Accessories\AccessoryCheckinController::class, 'store']
)->name('accessories.checkin.store');
});
Route::resource('accessories', Accessories\AccessoriesController::class, [
'middleware' => ['auth'],
'parameters' => ['accessory' => 'accessory_id'],
]);