freescout-customers-groups/Http/routes.php

38 lines
1.1 KiB
PHP

<?php
/*
SPDX-License-Identifier: AGPL-3.0-only
SPDX-FileCopyrightText: © 2024 Millions Missing FRANCE <info@millionsmissing.fr>
*/
use Illuminate\Support\Facades\Route;
Route::group(
[
'middleware' => 'web',
'prefix' => \Helper::getSubdirectory(),
'namespace' => 'Modules\MMFCustomersGroups\Http\Controllers'
],
function() {
// TODO: Check if the "laroute" property is required.
Route::get('/groups/list', [
'uses' => CustomersGroupsController::class . '@list',
'laroute' => true,
])->name('groups.list');
Route::get('/groups/create', [
'uses' => CustomersGroupsController::class . '@create',
'laroute' => true,
])->name('groups.create');
Route::post('/groups/create', [
'uses' => CustomersGroupsController::class . '@save',
'laroute' => true,
]);
Route::get('/groups/{group}/edit', [
'uses' => CustomersGroupsController::class . '@update',
'laroute' => true,
])->name('groups.update');
Route::post('/groups/{group}/edit', [
'uses' => CustomersGroupsController::class . '@save',
'laroute' => true,
]);
}
);