title: Laravel 5.5 Eloquent - Article::find returning null
body: <p>I have two files,</p>
  
  <p><code>CommentTransformer</code></p>
  
  <p>And </p>
  
  <p><code>ImageTransformer</code></p>
  
  <p>In the first file, <code>CommentTransformer</code>, I can retrieve which Article it belongs to by doing this: </p>
  
  <p><code>$article = Article::find($comment-&gt;article_id);</code></p>
  
  <p>I'm doing the <strong>same exact thing</strong> in my ImageTransformer, but it returns <code>null</code>. Even if instead of using <code>Article::find($image-&gt;article_id)</code> I use <code>Article::find(1)</code> I still get a null result!</p>
  
  <p>Here's the full code:</p>
  
  <pre><code>namespace App\Transformers;
  
  use App\Article;
  use App\User;
  use App\Image;
  use League\Fractal\TransformerAbstract;
  
  class ImageTransformer extends TransformerAbstract
  {
  /**
   * A Fractal transformer.
   *
   * @return array
   */
  public function transform(Image $image)
  {
      $user = User::findOrFail($image-&gt;user_id);
      $article = Article::find($image-&gt;article_id);
     // $userArticle = User::find($article-&gt;user_id);
      return [
          'id'                 =&gt; (int) $image-&gt;id,
          'original_filename'  =&gt; $image-&gt;original_filename,
          'filename'           =&gt; $image-&gt;filename,
          'size'               =&gt; (int) $image-&gt;size,
          'path'               =&gt; url('/') . "/" . $image-&gt;path . '/' . $image-&gt;filename,
          'posted_by_username' =&gt; $user-&gt;name,
          'article'            =&gt; $article //if I call $article-&gt;id it returns "Trying to get property of non-object" as it is, it returns null
      ];
  }
  }
  </code></pre>
  
  <p>This is the response:</p>
  
  <pre><code>{
  "data": [
      {
          "id": 1,
          "original_filename": "ptd.jpg",
          "filename": "f11bbe288649e76ec3b694890160abf930601aed.jpeg",
          "size": 103297,
          "path": "http:\/\/192.168.1.85:1299\/uploads\/f11bbe288649e76ec3b694890160abf930601aed.jpeg",
          "posted_by_username": "josh beck",
          "article": null
      }
     ]
   }
  </code></pre>