new feature

This commit is contained in:
JaguarJack
2022-12-14 19:25:52 +08:00
parent b63cd5d01c
commit 098463f4e1
35 changed files with 391 additions and 146 deletions

View File

@@ -4,9 +4,26 @@ namespace Modules\Permissions\Providers;
use Catch\CatchAdmin;
use Catch\Providers\CatchModuleServiceProvider;
use Modules\Permissions\Middlewares\PermissionGate;
class PermissionsServiceProvider extends CatchModuleServiceProvider
{
/**
* register permission gate
*
* @throws \Psr\Container\ContainerExceptionInterface
* @throws \Psr\Container\NotFoundExceptionInterface
*/
protected function registering()
{
$route = $this->app['config']->get('catch.route');
$route['middlewares'][] = PermissionGate::class;
$this->app['config']->set('catch.route', $route);
}
/**
* route path
*