title: Get column value from Many to Many Relationship in Laravel
body: <p>This is my tables structure:
  <a href="https://i.stack.imgur.com/T6wJB.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/T6wJB.jpg" alt="enter image description here"></a></p>
  
  <p><strong>Attribute.php</strong></p>
  
  <pre><code>&lt;?php
  
  namespace App;
  
  use Illuminate\Database\Eloquent\Model;
  
  class Attribute extends Model
  {
     protected $guarded = [];
  
     public function products()
     {
         return $this-&gt;belongsToMany('App\Product');
     }
  
  }
  </code></pre>
  
  <p><strong>Product.php</strong></p>
  
  <pre><code>&lt;?php
  
  namespace App;
  
  use Illuminate\Database\Eloquent\Model;
  
  class Product extends Model
  {
     protected $guarded = [];
  
     public function attributes()
     {
         return $this-&gt;belongsToMany('App\Attribute');
     }
  
  }
  </code></pre>
  
  <p>I want to get the <code>value</code> column for each row.<br/>
  What code should I write in my controller to access this <code>value</code>?<br/>
  Laravel version:  6.9.0<br/>
  Thanks</p>