title: Laravel hasMany on json field
body: <p>I would like to get all products related to a certian color using Eloquent 'hasMany' relationship. However the colors related to products are stored in <code>json</code> value in the products table.</p>
  
  <p>Color Table:</p>
  
  <pre><code>-------------
  id | color   
  -------------
   1  Black     
   2  Brown
   3  Gray
  </code></pre>
  
  <p>Product Table:</p>
  
  <pre><code>------------------------------
  id | name      | color
  ------------------------------
   1   Shoe Name   ["1","2"]
   2   Shoe Name   ["2","3"]
  </code></pre>
  
  <p>Color Model</p>
  
  <pre><code>public function products()
  {
    return $this-&gt;hasMany(Product::class, 'color');
  }
  </code></pre>
  
  <p>But unfortunately nothing returns when i do
  <code>dd(Color::products());</code></p>
  
  <p>I know the issue is trying to do a <code>hasMany</code> on a json field, any help or assistance would be great. Unfortunately i won't be able to change the database structure. I need to work with it as is. </p>
  
  <p>Thanks in advance.</p>