src/Http/Controllers/Frontarea/PhoneVerificationController.php
public function send(PhoneVerificationSendRequest $request)
    {
        $user = $request->user($this->getGuard())
                ?? $request->attemptUser($this->getGuard())
                   ?? app('cortex.auth.member')->whereNotNull('phone')->where('phone', $request->input('phone'))->first();

        $user->sendPhoneVerificationNotification($request->get('method'), true);

        return intend([
            'url' => route('frontarea.verification.phone.verify', ['phone' => $user->phone]),
            'with' => ['success' => trans('cortex/auth::messages.verification.phone.sent')],
        ]);
    }
public function send(PhoneVerificationSendRequest $request)
    {
        $user = $request->user($this->getGuard())
                ?? $request->attemptUser($this->getGuard())
                   ?? app('cortex.auth.member')->whereNotNull('phone')->where('phone', $request->input('phone'))->first();

        $user->sendPhoneVerificationNotification($request->get('method'), true);

        return intend([
            'url' => route('frontarea.verification.phone.verify', ['phone' => $user->phone]),
            'with' => ['success' => trans('cortex/auth::messages.verification.phone.sent')],
        ]);
    }
public function send ( PhoneVerificationSendRequest $ request ) { $ user = $ request -> user ( $ this -> getGuard ( ) ) ?? $ request -> attemptUser ( $ this -> getGuard ( ) ) ?? app ( 'cortex.auth.member' ) -> whereNotNull ( 'phone' ) -> where ( 'phone' , $ request -> input ( 'phone' ) ) -> first ( ) ; $ user -> sendPhoneVerificationNotification ( $ request -> get ( 'method' ) , true ) ; return intend ( [ 'url' => route ( 'frontarea.verification.phone.verify' , [ 'phone' => $ user -> phone ] ) , 'with' => [ 'success' => trans ( 'cortex/auth::messages.verification.phone.sent' ) ] , ] ) ; }
Process the phone verification request form.

@param \Cortex\Auth\B2B2C2\Http\Requests\Frontarea\PhoneVerificationSendRequest $request

@return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse
Process the phone verification request form .