title: Laravel Eloquent Relationships
body: <p>I have a table of Questions and another table that has Answers.  A question has many answers, and an answer belongs to a question.  These relationships have been defined in the Question and Answer model and work as expected.</p>
  
  <p>However, when I try to get a bunch of questions with the answers, Eloquent returns an empty array.</p>
  
  <pre><code>return Question::with('answers')
                  -&gt;where('category_id', $input['category'])
                  -&gt;take($input['num_questions'])
                  -&gt;orderBy(DB::raw('RAND()'))
                  -&gt;get();
  </code></pre>
  
  <p>I get the following response...</p>
  
  <pre><code>{
  "id": "1",
  "category_id": "1",
  "question": "Why did the chicken cross the road?",
  "feedback": "Why did you ask that?",
  "created_at": "2014-04-24 16:57:48",
  "updated_at": "2014-04-24 16:57:48",
  "answers": []
  },
  {
  "id": "2",
  "category_id": "1",
  "question": "How awesome is Laravel?",
  "feedback": "That's debatable.",
  "created_at": "2014-04-24 16:57:48",
  "updated_at": "2014-04-24 16:57:48",
  "answers": []
  }
  </code></pre>
  
  <p>When printing the raw queries I see the following...</p>
  
  <pre><code>{
  "query": "select * from `questions` where `category_id` = ? order by RAND() asc",
  "bindings": [
      "1"
  ],
  "time": 2.11
  },
  {
  "query": "select `id`, `choice`, `correct` from `answers` where `answers`.`question_id` in (?, ?, ?, ?)",
  "bindings": [
      "3",
      "4",
      "1",
      "2"
  ],
  "time": 0.92
  }
  </code></pre>
  
  <p>When I run these queries manually, I see answers, but for some reason laravel shows an empty array.  Why?  What am I doing wrong here?</p>