mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 14:09:43 -08:00
3d8e0b707e
Signed-off-by: snipe <snipe@snipe.net>
49 lines
1.4 KiB
PHP
49 lines
1.4 KiB
PHP
<?php
|
|
|
|
use App\Http\Controllers\Components;
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
// Components
|
|
Route::group(['prefix' => 'components', 'middleware' => ['auth']], function () {
|
|
Route::get(
|
|
'{componentID}/checkout',
|
|
[Components\ComponentCheckoutController::class, 'create']
|
|
)->name('components.checkout.show');
|
|
|
|
Route::post(
|
|
'{componentID}/checkout',
|
|
[Components\ComponentCheckoutController::class, 'store']
|
|
)->name('components.checkout.store');
|
|
|
|
Route::get(
|
|
'{componentID}/checkin/{backto?}',
|
|
[Components\ComponentCheckinController::class, 'create']
|
|
)->name('components.checkin.show');
|
|
|
|
Route::post(
|
|
'{componentID}/checkin/{backto?}',
|
|
[Components\ComponentCheckinController::class, 'store']
|
|
)->name('components.checkin.store');
|
|
|
|
Route::post(
|
|
'{componentId}/upload',
|
|
[Components\ComponentsFilesController::class, 'store']
|
|
)->name('upload/component');
|
|
|
|
Route::delete(
|
|
'{componentId}/deletefile/{fileId}',
|
|
[Components\ComponentsFilesController::class, 'destroy']
|
|
)->name('delete/componentfile');
|
|
|
|
Route::get(
|
|
'{componentId}/showfile/{fileId}/{download?}',
|
|
[Components\ComponentsFilesController::class, 'show']
|
|
)->name('show.componentfile');
|
|
|
|
});
|
|
|
|
Route::resource('components', Components\ComponentsController::class, [
|
|
'middleware' => ['auth'],
|
|
'parameters' => ['component' => 'component_id'],
|
|
]);
|