|
1 | 1 | <?php |
2 | 2 |
|
| 3 | +use App\Features\ShowAuthButtons; |
3 | 4 | use App\Http\Controllers\Auth\CustomerAuthController; |
4 | 5 | use App\Http\Controllers\CustomerLicenseController; |
5 | 6 | use App\Http\Controllers\CustomerSubLicenseController; |
6 | 7 | use App\Http\Controllers\ShowBlogController; |
7 | 8 | use App\Http\Controllers\ShowDocumentationController; |
8 | 9 | use Illuminate\Support\Facades\Route; |
9 | 10 | use Illuminate\Support\Str; |
| 11 | +use Laravel\Pennant\Middleware\EnsureFeaturesAreActive; |
10 | 12 |
|
11 | 13 | /* |
12 | 14 | |-------------------------------------------------------------------------- |
|
92 | 94 | Route::post('license/{license}/renewal/checkout', [App\Http\Controllers\LicenseRenewalController::class, 'createCheckoutSession'])->name('license.renewal.checkout'); |
93 | 95 |
|
94 | 96 | // Customer authentication routes |
95 | | -Route::middleware('guest')->group(function () { |
| 97 | +Route::middleware(['guest', EnsureFeaturesAreActive::using(ShowAuthButtons::class)])->group(function () { |
96 | 98 | Route::get('login', [CustomerAuthController::class, 'showLogin'])->name('customer.login'); |
97 | 99 | Route::post('login', [CustomerAuthController::class, 'login']); |
98 | 100 |
|
|
103 | 105 | Route::post('reset-password', [CustomerAuthController::class, 'resetPassword'])->name('password.update'); |
104 | 106 | }); |
105 | 107 |
|
106 | | -Route::post('logout', [CustomerAuthController::class, 'logout'])->name('customer.logout'); |
| 108 | +Route::post('logout', [CustomerAuthController::class, 'logout']) |
| 109 | + ->middleware(EnsureFeaturesAreActive::using(ShowAuthButtons::class)) |
| 110 | + ->name('customer.logout'); |
107 | 111 |
|
108 | 112 | // Customer license management routes |
109 | | -Route::middleware('auth')->prefix('customer')->name('customer.')->group(function () { |
| 113 | +Route::middleware(['auth', EnsureFeaturesAreActive::using(ShowAuthButtons::class)])->prefix('customer')->name('customer.')->group(function () { |
110 | 114 | Route::get('licenses', [CustomerLicenseController::class, 'index'])->name('licenses'); |
111 | 115 | Route::get('licenses/{licenseKey}', [CustomerLicenseController::class, 'show'])->name('licenses.show'); |
112 | 116 | Route::patch('licenses/{licenseKey}', [CustomerLicenseController::class, 'update'])->name('licenses.update'); |
|
0 commit comments