title: How can I resolve error : Call to undefined function App\Http\Controllers\JSON_EXTRACT() in laravel 5.3?
body: <p>For example, I have a column named json in table A</p>
  
  <p>Json column contains json data like this :</p>
  
  <pre><code>record 1 : {"dept_code": "012", "unit_code": "22"}
  record 2 : {"dept_code": "013", "unit_code": "23"}
  etc
  </code></pre>
  
  <p>I want to take the data records with json column that contain dept_code = 012</p>
  
  <p>I try like this :</p>
  
  <pre><code>$id = "012";
  $data = \DB::table('table_A')
             -&gt;select('*')
             -&gt;where(JSON_EXTRACT('json', "$.dept_code"), '=', '"'.$id.'"')
             -&gt;get();
  </code></pre>
  
  <p>There exist error like this :</p>
  
  <blockquote>
    <p>Call to undefined function App\Http\Controllers\JSON_EXTRACT()</p>
  </blockquote>
  
  <p>How can I resolve that?</p>