title: Laravel 5 extend auth::user() with information from other database table
body: <p>I am using <code>Auth::user()</code> to get information on the current logged in user. Now I want to extend the Information delivered by <code>Auth::user()</code>. Concrete the <em>activation state</em> of the user shall be available. </p>
  
  <p>This information is stored in the table <em>activations</em> in the column <em>state</em>. </p>
  
  <p>From my understanding <code>Auth::user()</code> delivers what will be retrived from the <em>user model</em>. So I should create a relationship between table <em>users</em> and table <em>activations</em>. The <a href="http://laravel.com/docs/5.0/eloquent#one-to-one" rel="nofollow">documentation</a> states 2 posibilites, both require that the <em>activations</em> table has a foreign_key <em>user_id</em>. </p>
  
  <p>My table layout does not cover that, I just have refernce in the <em>users</em> table to the <em>actvtion_id</em>.  </p>
  
  <p>is there a possibilty to build a relationsship with my table layout, which leads to the desired result, that <code>Auth::user()</code> deliveres me the <em>activation state</em>? If how should I do it? </p>
  
  <p>Or do I have to switch the table layout as recommended in the documentation?</p>
  
  <p>Below my table code: </p>
  
  <p><strong>Controller</strong>: </p>
  
  <pre class="lang-php prettyprint-override"><code>class ProfileController extends Controller {
  
      public function me()
      {
          return Auth::user(  );
      }
  }
  </code></pre>
  
  <p><strong>users (migration)</strong>: </p>
  
  <pre class="lang-php prettyprint-override"><code>    Schema::create('users', function(Blueprint $table)
      {
          $table-&gt;increments('id');
          $table-&gt;string('email')-&gt;unique();
          $table-&gt;integer('activation_id')-&gt;unsigned(); 
          $table-&gt;foreign('activation_id')-&gt;references( 'id' )-&gt;on( 'activations' );
          //...
          $table-&gt;timestamps();
      });
  </code></pre>
  
  <p><strong>activations (migration)</strong>: </p>
  
  <pre class="lang-php prettyprint-override"><code>    Schema::create('activations', function(Blueprint $table)
      {
          $table-&gt;increments('id');   
          $table-&gt;string('activationStatus', 1)-&gt;nullable()-&gt;default('N');
          // ...
          $table-&gt;timestamps();
      });
  </code></pre>