hi, i’m trying to show users data whereNotIn on other table using kelas_id.
but i cant use kelas_id params in query function on DB:table.
please help, thank you so much
The answer above is correct, this is due to the scope of the variables. The anonymous function can’t read the data $kelas_id because it’s scopes begins when is created. The solution is a use and the variable we want to use.
2
Answers
i have found the answer, u can solve this with add use ($diklat) after ($query)
the code will be like this :
The answer above is correct, this is due to the scope of the variables. The anonymous function can’t read the data $kelas_id because it’s scopes begins when is created.
The solution is a use and the variable we want to use.