title: Get primary key name in eloquent model
body: <p>How to get name of primary key from model in laravel?</p>
  
  <p>like this</p>
  
  <pre><code>dd(User::primaryKeyName()); // -&gt; 'user_id'
  </code></pre>
  
  <p>I want to sort data on primary if 'order' is empty</p>
  
  <pre><code>$data = User::orderBy(Input::get('order', User::primaryKey()), 'ASC')-&gt;get();
  </code></pre>
  
  <p>but have</p>
  
  <pre><code>Non-static method Illuminate\Database\Eloquent\Model::getKeyName() should not be called statically, assuming $this from incompatible context
  </code></pre>