public function handle(CreateUserCommand $command)
    {
        $user = User::create([
            'username' => $command->username,
            'password' => $command->password,
            'email'    => $command->email,
            'level'    => $command->level,
        ]);

        event(new UserWasCreatedEvent($user));

        return $user;
    }
public function handle(CreateUserCommand $command)
    {
        $user = User::create([
            'username' => $command->username,
            'password' => $command->password,
            'email'    => $command->email,
            'level'    => $command->level,
        ]);

        event(new UserWasCreatedEvent($user));

        return $user;
    }
public function handle ( CreateUserCommand $ command ) { $ user = User :: create ( [ 'username' => $ command -> username , 'password' => $ command -> password , 'email' => $ command -> email , 'level' => $ command -> level , ] ) ; event ( new UserWasCreatedEvent ( $ user ) ) ; return $ user ; }
Handle the add user command.

@param \CachetHQ\Cachet\Bus\Commands\User\CreateUserCommand $command

@return \CachetHQ\Cachet\Models\User
Handle the add user command .