title: How to decrypt password in Laravel 4 when selecting a record from the database using the Eloquent Model Class?
body: <p>I've a small application where users can make accounts and also edit there accounts inclusive their passwords. I want to insert all the records of the account, which I select from the database, in the inputs of the editform by using the <code>value="value here"</code> option.</p>
  
  <p>The case is that I use a Validator to validate the input of the user, this Validator is the same to create and edit an account.:</p>
  
  <pre><code>class Account extends Validator {
      public static $rules = [
          'name' =&gt; 'required|alpha|min:2',
          'secondname' =&gt; 'alpha_spaces|min:2',
          'lastname' =&gt; 'required|alpha|min:2',
          'email' =&gt; 'required|email|unique:accounts',
          'password' =&gt; 'required|alpha_num|between:6,12|confirmed',
          'password_confirmation' =&gt; 'required|alpha_num|between:6,12'
      ];
  }
  </code></pre>
  
  <p>This is my edit-form:
  <img src="https://i.stack.imgur.com/ZT3eI.png" alt="This is my edit-form"></p>
  
  <p>This is my code where I select the records from the db:</p>
  
  <pre><code>$q = Input::get('query');
  $result = Account::where('id', '=', $q)-&gt;get();
  </code></pre>
  
  <p>In this case will the password be inserted in the input as hashed. So when the user even don't want to change his password it changes, because the hashed password will again be hashed.</p>
  
  <p>So I need in some way select the password unhashed so when the user don't want to edit his password it stays the same.</p>
  
  <p>Can somebody help me out?</p>