title: Unexpected T Variable Laravel
body: <p>I'm getting an error on the following on:</p>
  
  <pre><code> $user-&gt;email    = Input::get('email');
  </code></pre>
  
  <p>I'm really unsure what is wrong with the code, it seems perfectly fine.  I looked up t variable errors, simply involve missing a bracket or semi colon.  But as far as I'm aware it seems fine. </p>
  
  <p>If anyone could help me out, that would be great.  </p>
  
  <p>If there is any other code, could you list it as a comment and i'll happily add it. </p>
  
  <p>Thanks!</p>
  
  <pre><code>public function doRegister()
  {
      $rules = array(
          'name'    =&gt; 'required|min:3', // name
          'email'    =&gt; 'required|email', // make sure the email is an actual email
          'password' =&gt; 'required|alphaNum|min:3' // password can only be alphanumeric and has to be greater than 3 characters
      );
  
      // run the validation rules on the inputs from the form
      $validator = Validator::make(Input::all(), $rules);
  
      if ($validator-&gt;fails()){
          // validation not successful, send back to form 
          Redirect::back()-&gt;withErrors;
      } else {        
          $user = Input::all();
          User::addNewUser();     
          if (Auth::attempt($user)) {
              return Redirect::to('member');
          }
      }
  
  }
  </code></pre>
  
  <p>User model</p>
  
  <pre><code>    public static function addNewUser()
  {
              $user = new User;
              $user-&gt;name     = Input::get('name');
              $user-&gt;email    = Input::get('email');
              $user-&gt;password = Hash::make(Input::get('password'));
              $user-&gt;save();
  }
  </code></pre>