Files
laravel-manager/src/Modules/Users/UsersModule.php
T
Matthijs Iriks 60ad85a621
PR CI / ledger (pull_request) Successful in 3s
PR CI / flow (pull_request) Successful in 4s
PR CI / ui (pull_request) Successful in 17s
PR CI / test (lowest) (pull_request) Successful in 45s
PR CI / test (stable) (pull_request) Successful in 48s
PR CI / security (pull_request) Successful in 54s
PR CI / pr-ci (pull_request) Successful in 1s
PR CI / release-automerge (pull_request) Successful in 3s
Let route names and tables move, and add manager:import
2026-12-04 05:08:08 +01:00

68 lines
1.6 KiB
PHP

<?php
namespace IriksIT\Manager\Modules\Users;
use IriksIT\Manager\Modules\BaseModule;
use IriksIT\Manager\Support\Names;
use IriksIT\Manager\Support\Permission;
class UsersModule extends BaseModule
{
public function key(): string
{
return 'users';
}
public function label(): string
{
return 'Users';
}
public function enabledByDefault(): bool
{
return true;
}
public function tables(): array
{
return ['groups', 'group_user'];
}
public function permissions(): array
{
return [
new Permission('accounts.manage', 'Create, change and delete accounts, and put them in groups', 'Accounts'),
];
}
public function navigation(): array
{
return [
['label' => 'Accounts', 'route' => Names::route('accounts.index'), 'permission' => 'accounts.manage'],
['label' => 'Groups', 'route' => Names::route('groups.index'), 'permission' => 'groups.manage'],
];
}
public function actions(): array
{
return [
'accounts.store' => ['Created an account'],
'accounts.update' => ['Changed an account'],
'accounts.destroy' => ['Deleted an account'],
'groups.store' => ['Created a group'],
'groups.update' => ['Changed a group'],
'groups.destroy' => ['Deleted a group'],
];
}
public function views(): array
{
return ['accounts.index' => 'Opened the accounts', 'groups.index' => 'Opened the groups'];
}
public function commands(): array
{
return [CreateManagerUser::class];
}
}