catchAdmin/modules/Permissions/Providers/PermissionsServiceProvider.php

32 lines
637 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
*/
public function routePath(): string|array
{
// TODO: Implement path() method.
return CatchAdmin::getModuleRoutePath('Permissions');
}
}