app->make(NotificationTypeRegistry::class)->register(new NotificationTypeDefinition( key: 'client_registered', label: 'A new client registered an account', template: ':clientName (:clientEmail) registered a client account', // The list, filtered to this address — not clients.edit, which // is gated by edit_clients while the recipients below are chosen // by manage_clients. A notification that refuses the person it // was sent to is worse than one that lands a click short. url: fn (array $data): string => route('clients.index', ['search' => $data['clientEmail']]), )); if ($this->app->runningInConsole()) { $this->commands([ Console\ExpireClientAccountsCommand::class, ]); } } }