Updated routes

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2021-06-12 01:05:20 -07:00
parent 14ac7a2181
commit 346d879344
3 changed files with 44 additions and 33 deletions

View file

@ -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, [

View file

@ -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, [

View file

@ -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'],
]);