public function register()
{
$this->app->singleton(['xe.permission' => PermissionHandler::class], function ($app) {
$repo = new DatabaseRepository($app['xe.db']->connection());
if ($app['config']['app.debug'] !== true) {
$repo = new CacheDecorator($repo, new LaravelCache($app['cache.store']));
}
return new PermissionHandler($repo);
});
}