diff --git a/routes/web/accessories.php b/routes/web/accessories.php index 52b282ead8..c6e9b5a8e2 100644 --- a/routes/web/accessories.php +++ b/routes/web/accessories.php @@ -9,21 +9,24 @@ use Illuminate\Support\Facades\Route; Route::group(['prefix' => 'accessories', 'middleware' => ['auth']], function () { Route::get( '{accessoryID}/checkout', - ['as' => 'checkout/accessory', 'uses' => [Accessories\AccessoryCheckoutController::class, 'create']] - ); + [Accessories\AccessoryCheckoutController::class, 'create'] + )->name('checkout/accessory'); + Route::post( '{accessoryID}/checkout', - ['as' => 'checkout/accessory', 'uses' => [Accessories\AccessoryCheckoutController::class, 'store']] - ); + [Accessories\AccessoryCheckoutController::class, 'store'] + )->name('checkout/accessory'); Route::get( '{accessoryID}/checkin/{backto?}', - ['as' => 'checkin/accessory', 'uses' => [Accessories\AccessoryCheckinController::class, 'create']] - ); + [Accessories\AccessoryCheckinController::class, 'create'] + )->name('checkout/accessory'); + Route::post( '{accessoryID}/checkin/{backto?}', - ['as' => 'checkin/accessory', 'uses' => [Accessories\AccessoryCheckinController::class, 'store']] - ); + [Accessories\AccessoryCheckinController::class, 'store'] + )->name('checkout/accessory'); + }); Route::resource('accessories', Accessories\AccessoriesController::class, [ diff --git a/routes/web/components.php b/routes/web/components.php index 7b37cc9eab..08c8533f5f 100644 --- a/routes/web/components.php +++ b/routes/web/components.php @@ -7,20 +7,24 @@ use Illuminate\Support\Facades\Route; Route::group(['prefix' => 'components', 'middleware' => ['auth']], function () { Route::get( '{componentID}/checkout', - ['as' => 'checkout/component', 'uses' => [Components\ComponentCheckoutController::class, 'create']] - ); + [Components\ComponentCheckoutController::class, 'create'] + )->name('checkout/accessory'); + Route::post( '{componentID}/checkout', - ['as' => 'checkout/component', 'uses' => [Components\ComponentCheckoutController::class, 'store']] - ); + [Components\ComponentCheckoutController::class, 'store'] + )->name('checkout/accessory'); + Route::get( - '{componentID}/checkin', - ['as' => 'checkin/component', 'uses' => [Components\ComponentCheckinController::class, 'create']] - ); + '{componentID}/checkin/{backto?}', + [Components\ComponentCheckinController::class, 'create'] + )->name('checkout/accessory'); + Route::post( - '{componentID}/checkin', - ['as' => 'component.checkin.save', 'uses' => [Components\ComponentCheckinController::class, 'store']] - ); + '{componentID}/checkin/{backto?}', + [Components\ComponentCheckinController::class, 'store'] + )->name('checkout/accessory'); + }); Route::resource('components', Components\ComponentsController::class, [ diff --git a/routes/web/consumables.php b/routes/web/consumables.php index 9caf442e4b..c8354ff34c 100644 --- a/routes/web/consumables.php +++ b/routes/web/consumables.php @@ -3,19 +3,23 @@ use App\Http\Controllers\Consumables; use Illuminate\Support\Facades\Route; - // Consumables - Route::group(['prefix' => 'consumables', 'middleware' => ['auth']], function () { - Route::get( - '{consumableID}/checkout', - ['as' => 'checkout/consumable', 'uses' => [Consumables\ConsumableCheckoutController::class, 'create']] - ); - Route::post( - '{consumableID}/checkout', - ['as' => 'checkout/consumable', 'uses' => [Consumables\ConsumableCheckoutController::class, 'store']] - ); - }); - Route::resource('consumables', Consumables\ConsumablesController::class, [ - 'middleware' => ['auth'], - 'parameters' => ['consumable' => 'consumable_id'], - ]); + +Route::group(['prefix' => 'consumables', 'middleware' => ['auth']], function () { + Route::get( + '{consumablesID}/checkout', + [Consumables\ConsumableCheckoutController, 'create'] + )->name('checkout/accessory'); + + Route::post( + '{consumablesID}/checkout', + [Consumables\ConsumableCheckoutController::class, 'store'] + )->name('checkout/accessory'); + + +}); + +Route::resource('consumables', Consumables\ConsumablesController::class, [ + 'middleware' => ['auth'], + 'parameters' => ['consumable' => 'consumable_id'], +]);