catchAdmin/modules/Permissions/Providers/PermissionsServiceProvider.php

32 lines
606 B
PHP
Raw Normal View History

2022-12-05 23:01:12 +08:00
<?php
namespace Modules\Permissions\Providers;
use Catch\CatchAdmin;
use Catch\Providers\CatchModuleServiceProvider;
2022-12-14 19:25:52 +08:00
use Modules\Permissions\Middlewares\PermissionGate;
2022-12-05 23:01:12 +08:00
class PermissionsServiceProvider extends CatchModuleServiceProvider
{
2022-12-14 19:25:52 +08:00
/**
2022-12-23 19:47:13 +08:00
* middlewares
2022-12-14 19:25:52 +08:00
*
2022-12-23 19:47:13 +08:00
* @return string[]
2022-12-14 19:25:52 +08:00
*/
2022-12-23 19:47:13 +08:00
protected function middlewares(): array
2022-12-14 19:25:52 +08:00
{
2022-12-23 19:47:13 +08:00
return [PermissionGate::class];
2022-12-14 19:25:52 +08:00
}
2022-12-05 23:01:12 +08:00
/**
* route path
*
* @return string|array
*/
2023-01-19 15:55:38 +08:00
public function moduleName(): string|array
2022-12-05 23:01:12 +08:00
{
// TODO: Implement path() method.
2023-01-19 15:55:38 +08:00
return 'permissions';
2022-12-05 23:01:12 +08:00
}
}