title: Laravel Eloquent where statement returns no attributes
body: <p>So from my previous post, I was advised to start using Eloquent models, which I did.</p>
  <p>My end goal, is to print out specific gifts, that belongs to that specific box.</p>
  <p><strong>Migrations:</strong></p>
  <p>gift_items:</p>
  <pre><code>public function up()
      {
          Schema::create('gift_items', function (Blueprint $table) {
              $table-&gt;id();
              $table-&gt;string('name');
              $table-&gt;float('unit_price');
              $table-&gt;integer('units_owned');
          });
      }
  </code></pre>
  <p>gift_campaigns:</p>
  <pre><code>public function up()
      {
          Schema::create('gift_campaigns', function (Blueprint $table) {
              $table-&gt;id();
              $table-&gt;string('name');
              $table-&gt;foreignId('user_foreignK')-&gt;constrained('users');
              $table-&gt;integer('gift_item_count')-&gt;nullable();
              $table-&gt;string('status');
              $table-&gt;date('dispatch_date');
              $table-&gt;date('delivery_date');
          });
      }
  </code></pre>
  <p>Pivot table:</p>
  <pre><code>public function up()
      {
          Schema::create('campaigns_gifts', function (Blueprint $table) {
              $table-&gt;foreignId('gift_id')-&gt;constrained('gift_items');
              $table-&gt;foreignId('campaign_id')-&gt;constrained('gift_campaigns');
          });
      }
  </code></pre>
  <p><strong>Controller:</strong></p>
  <pre><code>function box($id){
          $data = Campaign::with('gifts')-&gt;where('id', $id)-&gt;get();
          return view('DBqueries.boxView', ['data'=&gt;$data]);
      }
  </code></pre>
  <p>Error that I receive using this way:<a href="https://i.stack.imgur.com/yOEMG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yOEMG.png" alt="error" /></a></p>
  <p>Seems like the updated version is trying to call the gift_campaigns table id, instead of the pivots table campaign_id.</p>
  <p>Once again, I need that Request $id would match the pivots table campaign_id, and print out all of the gifts that this specific id holds</p>