Skip to content

A free open source IT asset/license management system

Checkout license modifications (this doesn’t work yet

snipe9d299340da07
diff --git a/routes/web/licenses.php b/routes/web/licenses.php
index 7212a47648..610de2a5c9 100644
--- a/routes/web/licenses.php
+++ b/routes/web/licenses.php
@@ -2,6 +2,8 @@
use App\Http\Controllers\Licenses;
use Illuminate\Support\Facades\Route;
+use App\Models\License;
+use Tabuna\Breadcrumbs\Trail;
// Licenses
Route::group(['prefix' => 'licenses', 'middleware' => ['auth']], function () {
@@ -10,14 +12,17 @@ Route::group(['prefix' => 'licenses', 'middleware' => ['auth']], function () {
Route::get('{licenseId}/freecheckout',
[Licenses\LicensesController::class, 'getFreeLicense']
)->name('licenses.freecheckout');
- Route::get('{licenseId}/checkout/{seatId?}',
+
+ Route::get('{license}/checkout/{seatId?}',
[Licenses\LicenseCheckoutController::class, 'create']
)->name('licenses.checkout');
+
Route::post(
'{licenseId}/checkout/{seatId?}',
[Licenses\LicenseCheckoutController::class, 'store']
); //name() would duplicate here, so we skip it.
- Route::get('{licenseSeatId}/checkin/{backto?}',
+
+ Route::get('{licenseSeat}/checkin/{backto?}',
[Licenses\LicenseCheckinController::class, 'create']
)->name('licenses.checkin');
@@ -59,5 +64,4 @@ Route::group(['prefix' => 'licenses', 'middleware' => ['auth']], function () {
Route::resource('licenses', Licenses\LicensesController::class, [
'middleware' => ['auth'],
- 'parameters' => ['license' => 'license_id'],
]);