foreach loop is iterating same values in join statment

  laravel, loops

I m new to laravel and making a search app for homeo remedies i am facing following problem
$remAilProps = DB::table(‘remedies’)

    ->join('ailment_modules', '', '=', 'ailment_modules.rem_id')
    ->join('ailments', 'ailment_modules.ail_id','=','')
    ->join('ailment_modules as ail','','=','ail.ail_id')
    return view('layout.navitems.users')
                ->with('remAilProps', $remAilProps);

when i loop it blade view the result is like
Diarhoea color,
green Diarhoea discharge,
profuse Diarhoea discharge,
scanty Diarhoea color,

i want to not iterate Diarhoea every time and also color and discharge
I have search lot but nothing solve my problems

Source: Laravel

Leave a Reply