I have this query
$data = DB::table('incidencias')
->join('clientes_incid', 'clientes_incid.rif', '=', 'incidencias.rif')
->select('incidencias.rif')
->distinct()
->get();
And I want to insert the information of this query in a new table in my database
How could I do that? somebody can help me?