I'm currently trying to implement a search data from multiple table in my mysql database.
Education table data is CSE
, HSC
, Diploma
and JobCircular table data is BSc in CSE
.
now i try to searching match CSE
my code is
$profileId = Auth::guard('company')->user()->id;
$user_id = Applyer::
where('com_id','=',$profileId)
->where('circular_id','=',$id)
->pluck('user_id')[0];
$examination = Education::selectRaw('subject')->where('user_id','=',$user_id)->orderBy('id','desc')->get();
foreach ($examination as $exam => $sub) {
$exam_list = JobCircular::where('education_requirements','LIKE', "%
{$sub}%")->get();
}
echo "<pre>";
print_r([$exam_list]);
when job circular education requirements BSc
in CSE
I expect the result is education table data CSE