title: Left Join in a many to many relation in Eloquent
body: <p>I shouldn't use raw query and it lead to this mess! Can you please help me to improve it.</p>
  
  <pre><code>@foreach($attributes as $attribute)
          {{ Form::bsText($attribute-&gt;name, $attribute-&gt;title, $customer-&gt;attributes()-&gt;find($attribute-&gt;id)-&gt;pivot-&gt;value ?? '') }}
  @endforeach
  </code></pre>
  
  <p>Attribute Model:</p>
  
  <pre><code>public function customers()
  {
      return $this-&gt;belongsToMany(Customer::class);
  }
  </code></pre>
  
  <p>Customer Model:</p>
  
  <pre><code>public function attributes()
  {
      return $this-&gt;belongsToMany(Attribute::class)-&gt;withPivot('value');
  }
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>public function show(Customer $customer)
  {
      $attributes = Attribute::all();
      return view('admin.customers.show', compact('customer', 'attributes'));
  }
  </code></pre>