public function handle(GenerateApiTokenCommand $command)
    {
        $user = $command->user;

        $user->update(['api_key' => User::generateApiKey()]);

        event(new UserRegeneratedApiTokenEvent($user));
    }
public function handle(GenerateApiTokenCommand $command)
    {
        $user = $command->user;

        $user->update(['api_key' => User::generateApiKey()]);

        event(new UserRegeneratedApiTokenEvent($user));
    }
public function handle ( GenerateApiTokenCommand $ command ) { $ user = $ command -> user ; $ user -> update ( [ 'api_key' => User :: generateApiKey ( ) ] ) ; event ( new UserRegeneratedApiTokenEvent ( $ user ) ) ; }
Handle the generate api key command.

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

@return void
Handle the generate api key command .