title: Getting parse error when i try to send reset password link in laravel
body: <p>I am using <code>Laravel 5.4</code>. I am getting error when i try to request <code>password reset link</code>. </p>
  
  <blockquote>
    <p>Symfony\Component\Debug\Exception\FatalThrowableErrorPOST
    /password/email Parse error: syntax error, unexpected '?', expecting
    variable (T_VARIABLE)</p>
  </blockquote>
  
  <p>File that error is pointing to is this ( at line <code>'return $next($request)'</code></p>
  
  <blockquote>
    <blockquote>
      <p>app/Http/Middleware/RedirectIfAuthenticated.php:24App\Http\Middleware\RedirectIfAuthenticated::handle   </p>
    </blockquote>
  </blockquote>
  
  <pre><code> namespace App\Http\Middleware;
   use Closure; 
   use Illuminate\Support\Facades\Auth;
  
   class RedirectIfAuthenticated {
   /**
    * Handle an incoming request.
    *
    * @param  \Illuminate\Http\Request  $request
    * @param  \Closure  $next
    * @param  string|null  $guard
    * @return mixed
    */
   public function handle($request, Closure $next, $guard = null)
   {
       if (Auth::guard($guard)-&gt;check()) {
           return redirect('/');
       }
  
       return $next($request);
   } 
  }
  </code></pre>
  
  <p>I debugged further into code and found out that this function is prolly causing issue.<br>
  FILE NAME:Symfony\Component\CssSelector\XPath\Extension\AttributeMatchingExtension</p>
  
  <pre><code>public function translateExists(XPathExpr $xpath, string $attribute, ?string $value): XPathExpr
  {
      return $xpath-&gt;addCondition($attribute);
  }
  </code></pre>