name('login'); Route::post('/login', [LoginController::class, 'authenticate'])->name('authenticate'); Route::middleware(['auth'])->group(function () { Route::get('/', function() { return redirect()->route('customers'); }); Route::get('/logout', [LoginController::class, 'logout'])->name('logout'); // Marques Route::get('/brands', [BrandController::class, 'index'])->name('brands'); Route::match(['get', 'post'], '/brand/manage/{id?}', [BrandController::class, 'manage'])->name('manage-brand'); // Services Route::get('/services', [ServiceController::class, 'index'])->name('services'); Route::match(['get', 'post'], '/service/manage/{id?}', [ServiceController::class, 'manage'])->name('manage-service'); Route::get('/services/{id}/token/generate', [ServiceController::class, 'generateApiToken'])->name('generate-token-service'); // Clients (Customer) Route::get('/customers', [CustomerController::class, 'index'])->name('customers'); Route::get('/customers/filter/{texte}/{brandId?}', [CustomerController::class, 'filter'])->name('filter-customer'); Route::get('/customer/{id}/{brandId}', [CustomerController::class, 'show'])->name('show-customer'); // Single optins Route::get('/single-optins', [SingleOptinsController::class, 'index'])->name('single-optins'); Route::get('/single-optins/filter/{texte}/{brandId?}', [SingleOptinsController::class, 'filter'])->name('filter-single-optins'); Route::post('/single-optins/{id}/delete', [SingleOptinsController::class, 'delete'])->name('single-optins-delete'); });