snipe-it/routes/web/components.php

30 lines
1,001 B
PHP
Raw Normal View History

2016-12-15 19:59:42 -08:00
<?php
2021-06-10 13:17:14 -07:00
use App\Http\Controllers\Components;
use Illuminate\Support\Facades\Route;
// Components
Route::group(['prefix' => 'components', 'middleware' => ['auth']], function () {
2016-12-15 19:59:42 -08:00
Route::get(
'{componentID}/checkout',
2021-06-10 13:17:14 -07:00
['as' => 'checkout/component', 'uses' => [Components\ComponentCheckoutController::class, 'create']]
2016-12-15 19:59:42 -08:00
);
Route::post(
'{componentID}/checkout',
2021-06-10 13:17:14 -07:00
['as' => 'checkout/component', 'uses' => [Components\ComponentCheckoutController::class, 'store']]
2016-12-15 19:59:42 -08:00
);
2017-11-08 06:06:05 -08:00
Route::get(
'{componentID}/checkin',
2021-06-10 13:17:14 -07:00
['as' => 'checkin/component', 'uses' => [Components\ComponentCheckinController::class, 'create']]
2017-11-08 06:06:05 -08:00
);
Route::post(
'{componentID}/checkin',
2021-06-10 13:17:14 -07:00
['as' => 'component.checkin.save', 'uses' => [Components\ComponentCheckinController::class, 'store']]
2017-11-08 06:06:05 -08:00
);
2016-12-15 19:59:42 -08:00
});
2021-06-10 13:17:14 -07:00
Route::resource('components', Components\ComponentsController::class, [
'middleware' => ['auth'],
'parameters' => ['component' => 'component_id'],
2016-12-15 19:59:42 -08:00
]);