title: Laravel 5.2 Update with foreign key
body: <p>hello i've been working on a laravel project lately, and i've wanted to be able to update my records that have foreign keys in them. i've succesfully been able to update records in tables that dont have a foreign key but for some reason my table with a foreign key doesn't want to update. when i var_dump($voorraad) i get the new value on my screen but it doesn't update into the database. I have the same code for my Product table and Location table and there it works completely fine.</p>
  
  <p>My Controller: </p>
  
  <pre><code> public function update(Request $request, $id)
  {
      //voorraad = stock in dutch
      //Product_id = foreign key from the table products
      //locatie_Id = foreign key from the tabe locations
      //aantal = ammount of a certain product
  
      $voorraad = Voorraad::FindOrFail($id);
  
  
      $voorraad-&gt;fill($request-&gt;only('aantal', 'Product_id', 'locatie_Id'));
  
      $voorraad-&gt;save();
  
      return redirect(route('voorraad.index'));
  
  }
  </code></pre>
  
  <p>My voorraad model</p>
  
  <pre><code>   class Voorraad extends Model
  {
      //aantal is the ammount 
  
  
  protected $fillable = ['aantal', 'Product_id', 'locatie_Id'];
  protected $table = 'voorraad';
  
  public function products()
  {
      return $this-&gt;belongsTo('App\Product', 'Product_id');
  }
  
  public function locaties()
  {
      return $this-&gt;belongsTo('App\Locatie', 'locatie_Id');
  }
  </code></pre>
  
  <p>My Product Model</p>
  
  <pre><code>class Product extends Model
  {
  //inkoopprijs = sell price
  //verkoop prijs = buy price
  //naam = product name
  
  
  protected $fillable = ['naam', 'inkoopprijs', 'verkoopprijs','created_at', 'updated_at'];
  
  protected $table = 'product';
  </code></pre>
  
  <p>}</p>
  
  <p>My Location Model:</p>
  
  <pre><code>class Locatie extends Model
  {
  protected $fillable = ['naam'];
  
  protected $table = 'locatie';    
  }
  </code></pre>
  
  <p>My edit form:</p>
  
  <pre><code>    {!! Form::model($voorraad,['action' =&gt; ['VoorraadsController@update', $voorraad-&gt;Id], 'method' =&gt; 'PATCH'])!!}
  
  {!! Form::label('aantal', 'aantal:') !!}
  {!! Form::text('aantal')!!}&lt;br&gt;
  
  {!! Form::label('Product_id', 'product:') !!} 
  {!! Form::select('Product_id', $products)!!}&lt;br&gt;
  
  {!! Form::label('locatie_Id', 'locatie:') !!} 
  {!! Form::select('locatie_Id', $locaties)!!} &lt;br&gt;
  
  {!! Form::submit('edit') !!}
  </code></pre>
  
  <p>Gyazo of Var_dump($voorraad): <a href="https://gyazo.com/109d54e2bb7a91bbb8b047611e66dbe0" rel="nofollow noreferrer">https://gyazo.com/109d54e2bb7a91bbb8b047611e66dbe0</a></p>
  
  <p>gyazo of var_dump($request):<a href="https://gyazo.com/8437ee90881ba38a039b5b583f8296a5" rel="nofollow noreferrer">https://gyazo.com/8437ee90881ba38a039b5b583f8296a5</a></p>
  
  <p>If there is any information missing just let me know and i'll add it</p>