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;
|
|
|
|
|
2021-06-10 13:15:52 -07:00
|
|
|
// Components
|
|
|
|
Route::group(['prefix' => 'components', 'middleware' => ['auth']], function () {
|
2016-12-15 19:59:42 -08:00
|
|
|
Route::get(
|
|
|
|
'{componentID}/checkout',
|
2021-06-12 01:05:20 -07:00
|
|
|
[Components\ComponentCheckoutController::class, 'create']
|
2022-08-01 17:45:39 -07:00
|
|
|
)->name('components.checkout.show');
|
2021-06-12 01:05:20 -07:00
|
|
|
|
2016-12-15 19:59:42 -08:00
|
|
|
Route::post(
|
|
|
|
'{componentID}/checkout',
|
2021-06-12 01:05:20 -07:00
|
|
|
[Components\ComponentCheckoutController::class, 'store']
|
2022-08-01 17:45:39 -07:00
|
|
|
)->name('components.checkout.store');
|
2021-06-12 01:05:20 -07:00
|
|
|
|
2017-11-08 06:06:05 -08:00
|
|
|
Route::get(
|
2021-06-12 01:05:20 -07:00
|
|
|
'{componentID}/checkin/{backto?}',
|
|
|
|
[Components\ComponentCheckinController::class, 'create']
|
2022-08-01 17:45:39 -07:00
|
|
|
)->name('components.checkin.show');
|
2021-06-12 01:05:20 -07:00
|
|
|
|
2017-11-08 06:06:05 -08:00
|
|
|
Route::post(
|
2021-06-12 01:05:20 -07:00
|
|
|
'{componentID}/checkin/{backto?}',
|
|
|
|
[Components\ComponentCheckinController::class, 'store']
|
2022-08-01 16:10:39 -07:00
|
|
|
)->name('components.checkin.store');
|
2021-06-12 01:05:20 -07:00
|
|
|
|
2022-11-01 19:09:51 -07:00
|
|
|
Route::post(
|
|
|
|
'{componentId}/upload',
|
2022-11-01 19:29:13 -07:00
|
|
|
[Components\ComponentsFilesController::class, 'store']
|
2022-11-01 19:09:51 -07:00
|
|
|
)->name('upload/component');
|
|
|
|
|
|
|
|
Route::delete(
|
|
|
|
'{componentId}/deletefile/{fileId}',
|
2022-11-01 19:29:13 -07:00
|
|
|
[Components\ComponentsFilesController::class, 'destroy']
|
2022-11-01 19:09:51 -07:00
|
|
|
)->name('delete/componentfile');
|
|
|
|
|
|
|
|
Route::get(
|
|
|
|
'{componentId}/showfile/{fileId}/{download?}',
|
2022-11-01 19:29:13 -07:00
|
|
|
[Components\ComponentsFilesController::class, 'show']
|
2022-11-01 19:09:51 -07:00
|
|
|
)->name('show.componentfile');
|
|
|
|
|
2016-12-15 19:59:42 -08:00
|
|
|
});
|
|
|
|
|
2021-06-10 13:17:14 -07:00
|
|
|
Route::resource('components', Components\ComponentsController::class, [
|
2017-03-11 05:16:56 -08:00
|
|
|
'middleware' => ['auth'],
|
2021-06-10 13:15:52 -07:00
|
|
|
'parameters' => ['component' => 'component_id'],
|
2016-12-15 19:59:42 -08:00
|
|
|
]);
|