snipe-it/routes/web/licenses.php

46 lines
1.6 KiB
PHP
Raw Normal View History

<?php
2021-06-10 13:17:14 -07:00
use App\Http\Controllers\Licenses;
use Illuminate\Support\Facades\Route;
// Licenses
Route::group(['prefix' => 'licenses', 'middleware' => ['auth']], function () {
Route::get('{licenseId}/clone', [Licenses\LicensesController::class, 'getClone'])->name('clone/license');
Route::get('{licenseId}/freecheckout',
[Licenses\LicensesController::class, 'getFreeLicense']
)->name('licenses.freecheckout');
Route::get('{licenseId}/checkout/{seatId?}',
[Licenses\LicenseCheckoutController::class, 'create']
)->name('licenses.checkout');
2016-12-15 11:57:19 -08:00
Route::post(
'{licenseId}/checkout/{seatId?}',
[Licenses\LicenseCheckoutController::class, 'store']
); //name() would duplicate here, so we skip it.
Route::get('{licenseSeatId}/checkin/{backto?}',
[Licenses\LicenseCheckinController::class, 'create']
)->name('licenses.checkin');
Route::post('{licenseId}/checkin/{backto?}',
[Licenses\LicenseCheckinController::class, 'store']
)->name('licenses.checkin.save');
2016-12-15 11:57:19 -08:00
Route::post(
'{licenseId}/upload',
[Licenses\LicenseFilesController::class, 'store']
)->name('upload/license');
Route::delete(
2016-12-15 11:57:19 -08:00
'{licenseId}/deletefile/{fileId}',
[Licenses\LicenseFilesController::class, 'destroy']
)->name('delete/licensefile');
2016-12-15 11:57:19 -08:00
Route::get(
2018-05-02 14:13:06 -07:00
'{licenseId}/showfile/{fileId}/{download?}',
[Licenses\LicenseFilesController::class, 'show']
)->name('show.licensefile');
});
2021-06-10 13:17:14 -07:00
Route::resource('licenses', Licenses\LicensesController::class, [
'middleware' => ['auth'],
'parameters' => ['license' => 'license_id'],
]);