2016-12-15 04:12:18 -08:00
|
|
|
<?php
|
|
|
|
|
2021-06-10 13:17:14 -07:00
|
|
|
use App\Http\Controllers\Consumables;
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
|
2016-12-15 04:12:18 -08:00
|
|
|
|
2021-06-12 01:05:20 -07:00
|
|
|
|
|
|
|
Route::group(['prefix' => 'consumables', 'middleware' => ['auth']], function () {
|
|
|
|
Route::get(
|
|
|
|
'{consumablesID}/checkout',
|
2021-06-12 01:35:29 -07:00
|
|
|
[Consumables\ConsumableCheckoutController::class, 'create']
|
2022-08-01 16:07:56 -07:00
|
|
|
)->name('consumables.checkout.show');
|
2021-06-12 01:05:20 -07:00
|
|
|
|
|
|
|
Route::post(
|
|
|
|
'{consumablesID}/checkout',
|
|
|
|
[Consumables\ConsumableCheckoutController::class, 'store']
|
2022-08-01 16:07:56 -07:00
|
|
|
)->name('consumables.checkout.store');
|
2021-06-12 01:05:20 -07:00
|
|
|
|
2022-11-01 17:52:04 -07:00
|
|
|
Route::post(
|
|
|
|
'{consumableId}/upload',
|
|
|
|
[Consumables\ConsumablesFilesController::class, 'store']
|
|
|
|
)->name('upload/consumable');
|
|
|
|
|
|
|
|
Route::delete(
|
|
|
|
'{consumableId}/deletefile/{fileId}',
|
|
|
|
[Consumables\ConsumablesFilesController::class, 'destroy']
|
|
|
|
)->name('delete/consumablefile');
|
|
|
|
|
|
|
|
Route::get(
|
|
|
|
'{consumableId}/showfile/{fileId}/{download?}',
|
|
|
|
[Consumables\ConsumablesFilesController::class, 'show']
|
|
|
|
)->name('show.consumablefile');
|
|
|
|
|
2024-07-20 08:40:32 -07:00
|
|
|
Route::get('{consumable}/clone',
|
|
|
|
[Consumables\ConsumablesController::class, 'clone']
|
|
|
|
)->name('consumables.clone.create');
|
|
|
|
|
2021-06-12 01:05:20 -07:00
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
Route::resource('consumables', Consumables\ConsumablesController::class, [
|
|
|
|
'middleware' => ['auth'],
|
|
|
|
'parameters' => ['consumable' => 'consumable_id'],
|
|
|
|
]);
|