Antoine Le Gonidec
7e749d7cf4
The ability to add new groups and update existing ones has not been implemented yet.
36 lines
816 B
PHP
36 lines
816 B
PHP
<?php
|
|
/*
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
SPDX-FileCopyrightText: © 2024 Millions Missing FRANCE <info@millionsmissing.fr>
|
|
*/
|
|
|
|
namespace Modules\MMFCustomersGroups\Http\Controllers;
|
|
|
|
use Illuminate\Routing\Controller;
|
|
|
|
use Modules\MMFCustomersGroups\Entities\CustomersGroup;
|
|
|
|
class CustomersGroupsController extends Controller {
|
|
public function list() {
|
|
// Get the list of Mailboxes the current User is allowed to access.
|
|
$user = auth()->user();
|
|
$mailboxes = $user->mailboxesIdsCanView();
|
|
|
|
// Get the list of Customers Groups, filtered by Mailbox.
|
|
$groups = CustomersGroup
|
|
::whereIn('mailbox_id', $mailboxes)
|
|
->get();
|
|
|
|
return view('mmfcustomersgroups::groups/list', [
|
|
'groups' => $groups,
|
|
]);
|
|
}
|
|
|
|
public function create() {
|
|
// TODO
|
|
}
|
|
|
|
public function update() {
|
|
// TODO
|
|
}
|
|
}
|