I got a question. Is it best practice to define gates in custom service providers? I am writing a permission system in Laravel by defining gates for each permission. I created a custom service provider that boots a singleton service that manages the permissions and delivers the permissions from a database. These permissions are getting defined as gates.
Example Service Container Boot:
class PermissionServiceProvider extends ServiceProvider
{
    public function boot(PermissionManager $manager)
    {
        $this->app->singleton(PermissionManager::class, function ($app) use ($manager) {
            return $manager;
        });
    }
}
Example PermissionManager function defineGates():
private function defineGates() {
    $gates = $this->loadAllPermissions();
    foreach ($gates as $gate) {
        Gate::define($gate, function (User $user) use ($gate) {
            return $user->hasPermission($gate);
        });
    }
}
Is it best practice?