title: Accociate a user name to the post they created
body: <p>If I created a blog post, how can I have my name associated with it? For example, on a page that lists all blog posts, I will see the user name of the post they created. Yes?</p>
  
  <p>In my post controller:</p>
  
  <pre><code>public function __construct(Post $post, User $user)
   {
      $this-&gt;middleware('auth',['except'=&gt;['index','show',]]);
      $this-&gt;post = $post;
      $this-&gt;user = $user;
   }
  
  public function show($id)
   {
      $user = $this-&gt;user-&gt;first(); // This seems to show the first user
      $post = $this-&gt;post-&gt;where('id', $id)-&gt;first(); // Grabs the assigned post
   }
  </code></pre>
  
  <p>In my <code>show.blade.php</code>:</p>
  
  <pre><code>{{ $user-&gt;name }}
  </code></pre>
  
  <p>How can I display the name of the user who created the post? I thought this <code>$user = $this-&gt;user-&gt;first();</code> would work. Im new to Laravel and I am using Laravel 5.</p>
  
  <p>Thanks!</p>
  
  <p><strong><em>EDIT</em></strong>
  User Model:</p>
  
  <pre><code>class User extends Model implements AuthenticatableContract, CanResetPasswordContract, BillableContract {
  
  use Authenticatable, CanResetPassword;
  
  use Billable;
  
  
  /**
   * The database table used by the model.
   *
   * @var string
   */
  protected $table = 'users';
  
  
  /**
   * The attributes that are mass assignable.
   *
   * @var array
   */
  protected $fillable = ['name', 'email', 'password', 'company_url', 'tagline','company_name', 'company_description'];
  
  /**
   * The attributes excluded from the model's JSON form.
   *
   * @var array
   */
  protected $hidden = ['password', 'remember_token'];
  
  /**
   * @var array
   *
   */
  
  protected $dates = ['trial_ends_at', 'subscription_ends_at'];
  
  
    public function posts()
    {
      return $this-&gt;hasMany('App\Post')-&gt;latest()-&gt;where('content_removed', 0);
  
  
    }
  
  
  }
  </code></pre>
  
  <p>Post Model:</p>
  
  <pre><code>class Post extends Model {
  
  /**
   * Fillable fields for a new Job.
   * @var array
   */
  
  protected $fillable = [
      'post_title',
      'post_description',
      'post_role',
      'post_types',
      'post_city',
      'post_country',
      'template',
      'content_removed',
  
  ];
  
  public function users()
  {
      return $this-&gt;hasMany('App\User')-&gt;orderBy('created_at', 'DESC');
  }
  
  
   public function creator()
   {
      return $this-&gt;belongsTo('App\User');
   }
  
  
  
  }
  </code></pre>