title: How to access a column in laravel query result
body: <p>I'm getting an error in my controller <code>Undefined property: Illuminate\Database\Eloquent\Collection::$created_at</code> </p>
  
  <p>How can I access a column <code>created_at</code> from a result of laravel query?</p>
  
  <p>Controller Code: </p>
  
  <pre><code>    public function getDashboard() {
          $posts=Post::latest('created_at')-&gt;get();
          dd($posts-&gt;created_at);
    //      $posts-&gt;created_at=Carbon::parse($posts-&gt;created_at)-&gt;diffForHumans(Carbon::now());
          return view('dashboard',compact('posts'));
      }
  </code></pre>
  
  <p>It works with <code>findOrFail(some_id)</code> but not with this, why?</p>