title: ErrorException Arrays to String conversion laravel 4 and Moloquent
body: <p>Good day,</p>
  
  <p>I'm currently using Moloquent by jenseggers and laravel 4...</p>
  
  <p>Everything works fine and even tried to get the lastname using this code to see if it's working</p>
  
  <pre><code>{{ $userGroup-&gt;lastname }}
  </code></pre>
  
  <p>and it's working fine, <strong>BUT</strong> when I tried to access <strong>groups</strong> by doing this</p>
  
  <pre><code>{{ $userGroup-&gt;groups }}
  </code></pre>
  
  <p>it throws an</p>
  
  <pre><code>ErrorException Array to string conversion (View: /var/www/laravel-learnapolis/app/views/dashboard/main.blade.php)`
  </code></pre>
  
  <p>tried doing var_dump and it gives me this output (working fine)</p>
  
  <pre><code>{{ var_dump($userGroup-&gt;groups) }}
  </code></pre>
  
  <p><strong>Result</strong></p>
  
  <pre><code>array(2) {
    [0]=&gt;
    array(4) {
      ["groupID"]=&gt;
      string(12) "140368641573"
      ["name"]=&gt;
      string(2) "aw"
      ["description"]=&gt;
      string(2) "wa"
      ["dateCreated"]=&gt;
      object(MongoDate)#187 (2) {
        ["sec"]=&gt;
        int(1403686415)
        ["usec"]=&gt;
        int(521000)
      }
    }
  </code></pre>
  
  <p><strong>------- For Reference ----------</strong></p>
  
  <p><strong>Mongo</strong></p>
  
  <pre><code>{
  "_id" : ObjectId("53a800a2abd28e07068b4567"),
  "email" : "my@email.com",
  "firstname" : "firstname",
  "lastname" : "lastname",
  "password" : "$2y$10$hUGZhkHWBKKxvk4n1LU16OYWeALlYxeU6C15UvzH1ic.gJ7O4uCsu",
  "hash" : "",
  "active" : 1,
  "updated_at" : ISODate("2014-06-24T10:43:21.958Z"),
  "remember_token" : "NSint7eLHFuxbDKRkpK11qyIUDDtS06LaBJt0MgwsjElrUllpORBbN8YVoSL",
  "groups" : [
      {
          "groupID" : "140368641573",
          "name" : "aw",
          "description" : "wa",
          "dateCreated" : ISODate("2014-06-25T08:53:35.521Z")
      }
  ]
  </code></pre>
  
  <p>}</p>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>public function dashboard() {
      $userID = Auth::user()-&gt;_id;
  
      $user = User::where('_id','=',$userID);
  
      if ( $user-&gt;count() ) {
          $user = $user-&gt;first();
          return View::make('dashboard.main')
                          -&gt;with('userGroup', $user);
      }
  
  }
  </code></pre>
  
  <p><strong>View (blade)</strong></p>
  
  <p><strong>works fine</strong></p>
  
  <pre><code>{{ $userGroup }}
  </code></pre>
  
  <p><strong>won't work</strong></p>
  
  <pre><code>{{ $userGroup-&gt;groups }}
  </code></pre>
  
  <p>Just having some hard time with this though, hope someone could help me. I'm a newbie with laravel but I do have an experience with MongoDB.. Tried searching to uncle google, but haven't got any solution(s) that solves the problem..</p>
  
  <p>Thanks!</p>