protected function resolveMaxAttempts($request, $maxAttempts)
    {
        if (Str::contains($maxAttempts, '|')) {
            $maxAttempts = explode('|', $maxAttempts, 2)[$request->user() ? 1 : 0];
        }

        if (! is_numeric($maxAttempts) && $request->user()) {
            $maxAttempts = $request->user()->{$maxAttempts};
        }

        return (int) $maxAttempts;
    }
protected function resolveMaxAttempts($request, $maxAttempts)
    {
        if (Str::contains($maxAttempts, '|')) {
            $maxAttempts = explode('|', $maxAttempts, 2)[$request->user() ? 1 : 0];
        }

        if (! is_numeric($maxAttempts) && $request->user()) {
            $maxAttempts = $request->user()->{$maxAttempts};
        }

        return (int) $maxAttempts;
    }
protected function resolveMaxAttempts ( $ request , $ maxAttempts ) { if ( Str :: contains ( $ maxAttempts , '|' ) ) { $ maxAttempts = explode ( '|' , $ maxAttempts , 2 ) [ $ request -> user ( ) ? 1 : 0 ] ; } if ( ! is_numeric ( $ maxAttempts ) && $ request -> user ( ) ) { $ maxAttempts = $ request -> user ( ) -> { $ maxAttempts } ; } return ( int ) $ maxAttempts ; }
Resolve the number of attempts if the user is authenticated or not.

@param  \Illuminate\Http\Request  $request
@param  int|string  $maxAttempts
@return int
Resolve the number of attempts if the user is authenticated or not .