title: Laravel syntax error, unexpected 'and' (T_LOGICAL_AND), expecting ')'
body: <p>i am using Laravel4 for my current project.I have a search functionality in my web application.This is my code for search functionality resides in one my controller.php file.</p>
  
  <pre><code>public function postBloodSearch(){
  
          $blood_group = Input::get('blood_group');
          $location = Input::get('location');
  
          if(empty($blood_group and $location)){
  
              return Redirect::route('donors')
                      -&gt;with('global','You have to enter both Blood Group and Location');
          }
  
          $result = Donor::where('blood_group','LIKE','%'.$blood_group.'%')-&gt;where('location','LIKE','%'.$location.'%')-&gt;get();
          return View::make('bloodDonation.blood_array')-&gt;with('result',$result);
  
  
  }
  </code></pre>
  
  <p>You can see,in my code that i have use  php built in <strong>empty</strong> function where actually i am facing
  the following error</p>
  
  <pre><code>syntax error, unexpected 'and' (T_LOGICAL_AND), expecting ')'
  </code></pre>
  
  <p>i have tried the following code to solve this problem(just replace the <strong>and</strong> by <strong>&amp;&amp;</strong> )</p>
  
  <pre><code>if(empty($blood_group &amp;&amp; $location)){.........}
  </code></pre>
  
  <p>now its throwing the following error</p>
  
  <pre><code>syntax error, unexpected '&amp;&amp;' (T_LOGICAL_AND), expecting ')'
  </code></pre>
  
  <p><strong>UPDATE:</strong> The same code is working absolutely fine in my local server(Xampp server).But  in my live server(I am using Cpanel),its throwing these errors.</p>