public function createUserFromRegistrationRequest(Request $request, $withSubscription = false)
	{
        return DB::transaction(function () use ($request, $withSubscription) {
            $user = $this->createNewUser($request, $withSubscription);

            if ($withSubscription) {
                $this->createSubscriptionOnStripe($request, $user);
            }

            return $user;
        });
	}
public function createUserFromRegistrationRequest(Request $request, $withSubscription = false)
	{
        return DB::transaction(function () use ($request, $withSubscription) {
            $user = $this->createNewUser($request, $withSubscription);

            if ($withSubscription) {
                $this->createSubscriptionOnStripe($request, $user);
            }

            return $user;
        });
	}
public function createUserFromRegistrationRequest ( Request $ request , $ withSubscription = false ) { return DB :: transaction ( function ( ) use ( $ request , $ withSubscription ) { $ user = $ this -> createNewUser ( $ request , $ withSubscription ) ; if ( $ withSubscription ) { $ this -> createSubscriptionOnStripe ( $ request , $ user ) ; } return $ user ; } ) ; }
Create a new user of the application based on a registration request.

@param  \Illuminate\Http\Request  $request
@param  bool  $withSubscription
@return \Illuminate\Contracts\Auth\Authenticatable
Create a new user of the application based on a registration request .