Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

User Bundle Laravel Package

bengor-user/user-bundle

Fully featured, well-tested Symfony user bundle built on BenGorUser. Supports multiple user types and HTML/JSON renderers. Includes registration (confirmation/invites), login/logout, JWT auth, password reset, user removal, role management, and token purging.

View on GitHub
Deep Wiki
Context7

Using existing use cases

To use one of the existing commands you just need to select the proper bus and select the command you want to use. One bus is created for each user type so select the correct one.

In the following examples EnableUserCommand is used to demonstrate the usage of the command bus. In case you want the whole list check command reference in the BenGor User library. The usage is the same, a command instance needs to be passed as first parameter of the handle() method of the command bus.

In case you are triggering the command from a Symfony controller do the following replacing $userType by your user type.

$this->get('bengor_user.' . $userType . '.command_bus')->handle(
    new EnableUserCommand($confirmationToken)
);

In case you want to trigger the command from a Symfony service you need to inject it in as usual, replacing your_user_type by your user type.

# app/config/services.yml
services:
    app.your_service:
         class: AppBundle\Service\YourService
         arguments: ['[@bengor_user](https://github.com/bengor_user).your_user_type.command_bus']
// src/AppBundle/Service/YourService.php

use  BenGorUser\User\Infrastructure\CommandBus\UserCommandBus;

class YourService 
{
    private $commandBus;
    
    public function __construct(UserCommandBus $commandBus) 
    {
        $this->commandBus = $commandBus;
    }
    
    public function doWhatever($confirmationToken) 
    {
       $this->commandBus->handle(
            new EnableUserCommand($confirmationToken)
       );
    }
}
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
steadrun/laravel-monitor
labyrinthe/connect-laravel
elmogy/layan
drewdan/sentinel-client
dskripchenko/laravel-llm
fatryst/nuonuo
stevenay/myanfont
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc
animalyoung/laravel-influxdb
onix-solutions/sms-telera
lonely-lights/prosetta
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin