2016-12-15 04:12:18 -08:00
|
|
|
<?php
|
|
|
|
|
2021-06-10 13:17:14 -07:00
|
|
|
use App\Http\Controllers\Licenses;
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
|
2021-06-10 13:15:52 -07:00
|
|
|
// Licenses
|
|
|
|
Route::group(['prefix' => 'licenses', 'middleware' => ['auth']], function () {
|
2021-06-22 16:58:23 -07:00
|
|
|
Route::get('{licenseId}/clone', [Licenses\LicensesController::class, 'getClone'])->name('clone/license');
|
2016-12-15 04:12:18 -08:00
|
|
|
|
2021-06-22 16:58:23 -07:00
|
|
|
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(
|
2018-07-23 20:28:45 -07:00
|
|
|
'{licenseId}/checkout/{seatId?}',
|
2021-06-22 16:58:23 -07:00
|
|
|
[Licenses\LicenseCheckoutController::class, 'store']
|
|
|
|
); //name() would duplicate here, so we skip it.
|
|
|
|
Route::get('{licenseSeatId}/checkin/{backto?}',
|
|
|
|
[Licenses\LicenseCheckinController::class, 'create']
|
|
|
|
)->name('licenses.checkin');
|
2016-12-15 04:12:18 -08:00
|
|
|
|
2021-06-22 16:58:23 -07:00
|
|
|
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',
|
2021-06-22 16:58:23 -07:00
|
|
|
[Licenses\LicenseFilesController::class, 'store']
|
|
|
|
)->name('upload/license');
|
2017-10-19 01:11:24 -07:00
|
|
|
Route::delete(
|
2016-12-15 11:57:19 -08:00
|
|
|
'{licenseId}/deletefile/{fileId}',
|
2021-06-22 16:58:23 -07:00
|
|
|
[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?}',
|
2021-06-22 16:58:23 -07:00
|
|
|
[Licenses\LicenseFilesController::class, 'show']
|
|
|
|
)->name('show.licensefile');
|
2016-12-15 04:12:18 -08:00
|
|
|
});
|
|
|
|
|
2021-06-10 13:17:14 -07:00
|
|
|
Route::resource('licenses', Licenses\LicensesController::class, [
|
2017-03-11 05:16:56 -08:00
|
|
|
'middleware' => ['auth'],
|
2021-06-10 13:15:52 -07:00
|
|
|
'parameters' => ['license' => 'license_id'],
|
2016-12-15 04:12:18 -08:00
|
|
|
]);
|