2016-12-15 04:12:18 -08:00
|
|
|
<?php
|
|
|
|
|
2021-06-10 13:17:14 -07:00
|
|
|
use App\Http\Controllers\Accessories;
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
|
2016-12-15 04:12:18 -08:00
|
|
|
/*
|
|
|
|
* Accessories
|
|
|
|
*/
|
2021-06-10 13:15:52 -07:00
|
|
|
Route::group(['prefix' => 'accessories', 'middleware' => ['auth']], function () {
|
2016-12-15 04:12:18 -08:00
|
|
|
Route::get(
|
|
|
|
'{accessoryID}/checkout',
|
2021-06-12 01:05:20 -07:00
|
|
|
[Accessories\AccessoryCheckoutController::class, 'create']
|
2022-08-01 16:06:28 -07:00
|
|
|
)->name('accessories.checkout.show');
|
2021-06-12 01:05:20 -07:00
|
|
|
|
2016-12-15 04:12:18 -08:00
|
|
|
Route::post(
|
2024-07-17 15:01:44 -07:00
|
|
|
'{accessory}/checkout',
|
2021-06-12 01:05:20 -07:00
|
|
|
[Accessories\AccessoryCheckoutController::class, 'store']
|
2022-08-01 16:06:28 -07:00
|
|
|
)->name('accessories.checkout.store');
|
2016-12-15 04:12:18 -08:00
|
|
|
|
|
|
|
Route::get(
|
|
|
|
'{accessoryID}/checkin/{backto?}',
|
2021-06-12 01:05:20 -07:00
|
|
|
[Accessories\AccessoryCheckinController::class, 'create']
|
2022-08-01 16:06:28 -07:00
|
|
|
)->name('accessories.checkin.show');
|
2021-06-12 01:05:20 -07:00
|
|
|
|
2016-12-15 04:12:18 -08:00
|
|
|
Route::post(
|
|
|
|
'{accessoryID}/checkin/{backto?}',
|
2021-06-12 01:05:20 -07:00
|
|
|
[Accessories\AccessoryCheckinController::class, 'store']
|
2022-08-01 16:06:28 -07:00
|
|
|
)->name('accessories.checkin.store');
|
2021-06-12 01:05:20 -07:00
|
|
|
|
2022-11-01 19:50:39 -07:00
|
|
|
Route::post(
|
|
|
|
'{accessoryId}/upload',
|
|
|
|
[Accessories\AccessoriesFilesController::class, 'store']
|
|
|
|
)->name('upload/accessory');
|
|
|
|
|
|
|
|
Route::delete(
|
|
|
|
'{accessoryId}/deletefile/{fileId}',
|
|
|
|
[Accessories\AccessoriesFilesController::class, 'destroy']
|
|
|
|
)->name('delete/accessoryfile');
|
|
|
|
|
|
|
|
Route::get(
|
|
|
|
'{accessoryId}/showfile/{fileId}/{download?}',
|
|
|
|
[Accessories\AccessoriesFilesController::class, 'show']
|
|
|
|
)->name('show.accessoryfile');
|
|
|
|
|
2023-03-07 13:41:48 -08:00
|
|
|
Route::get('{accessoryId}/clone',
|
|
|
|
[Accessories\AccessoriesController::class, 'getClone']
|
|
|
|
)->name('clone/accessories');
|
|
|
|
|
|
|
|
Route::post('{accessoryId}/clone',
|
|
|
|
[Accessories\AccessoriesController::class, 'postCreate']
|
|
|
|
);
|
|
|
|
|
2016-12-15 04:12:18 -08:00
|
|
|
});
|
|
|
|
|
2021-06-10 13:17:14 -07:00
|
|
|
Route::resource('accessories', Accessories\AccessoriesController::class, [
|
2017-03-11 05:16:56 -08:00
|
|
|
'middleware' => ['auth'],
|
2021-06-10 13:15:52 -07:00
|
|
|
'parameters' => ['accessory' => 'accessory_id'],
|
2016-12-15 04:12:18 -08:00
|
|
|
]);
|