title: Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) in Laravel
body: <p>In my Laravel Web Application I got following error in following Line. When Laravel Email Trigger</p>
  
  <blockquote>
    <p>Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE)</p>
  </blockquote>
  
  <pre><code>  $order=array();
  
    $order['contactname']=$customername;
    $order['contactnumber']=$cusconnum;
    $order['pickupaddress']=$request-&gt;input('pickupaddress');
    $order['deliveraddress']=$request-&gt;input('deliveryaddress');
    $order['pickupdate']=$request-&gt;input('pickupdate');
    $order['refnos']= $bookingpre."".$curbookingid;
  
    $myemail="karthik@w3cert.in";
  
    Mail::to($myemail)-&gt;send(new OrderBooked($order)); /* Error Raised Line */
  </code></pre>
  
  <p>following code for orderbooked mail</p>
  
  <p>OrderBooked.php</p>
  
  <pre><code>&lt;?php
  
  namespace App\Mail;
  
  use Illuminate\Bus\Queueable;
  use Illuminate\Mail\Mailable;
  use Illuminate\Queue\SerializesModels;
  use Illuminate\Contracts\Queue\ShouldQueue;
  
  class OrderBooked extends Mailable
  {
      use Queueable, SerializesModels;
  
  
      protected $order;
  
  
      /**
       * Create a new message instance.
       *
       * @return void
       */
      public function __construct(array $order)
      {
         $this-&gt;order = $order;
      }
  
      /**
       * Build the message.
       *
       * @return $this
       */
      public function build()
      {
  
      return $this-&gt;from('support@greatmovers.com.my')-&gt;markdown('emails.orders.booked') -&gt;with(['contactname' =&gt; $this-&gt;order['contactname'],'contactnumber' =&gt; $this-&gt;order['contactnumber'],'pickupaddress' =&gt; $this-&gt;order['pickupaddress'],'deliveraddress' =&gt; $this-&gt;order['deliveraddress'],'pickupdate' =&gt; $this-&gt;order['pickupdate'],'refnos' =&gt; $this-&gt;order['refnos'],]);
  
      }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/KGEq4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KGEq4.png" alt="enter image description here"></a></p>