How to join csv data with another table in laravel

I am using laravel framework to develop API’s i am facing one scenario i want to join table1 csv data to table2 primary id, after some research i found some answers in stack overflow but it’s throwing an following error

SQLSTATE[42S22]: Column not found: 1054 Unknown column '' in 'on clause' 


id              cat_id
1              2,3,4


id              name
  1             test1
  2             test2
  3             test4

can anyone help me to acheive this join ?

>Solution :

without seeing query can’t able to assume the scenario.for my case i will fix with the following way, Try the following one and let me know if it works..

Table1::where('some conditions')

Leave a Reply