I trying to join to two tables one with locations and another archive_data that can have multiple locations. so I am storing locations in archive data as json like this ["1","2","3"]
My query:
DB::table('archive_data as a')
->join('person as pe', 'pe.pe_id', '=', 'a.a_pe_id')
->join('portfolio as p', 'p.p_id', '=', 'a.a_p_id')
->join('tag as ta', 'ta.ta_id', '=', 'a.a_ta_id')
->join('type as t', 't.t_id', '=', 'a.a_ty_id')
->join('location as l', 'l.l_id', '=',"a.a_lc_id")
->join('series as s', 's.s_id', '=', 'a.a_s_id')
->join('bundle as b', 'b.b_id', '=', 'a.a_b_id');
Please tell me how can I join these two tables using laravel query builder. Thank you in advance.