I have two table content,category
1-Category table is two column name and cat_id
2-content has column title,name,cat_id,id
3-Suppose content has three multiple cat_id
4 now I have to fetch name from that value which is in category table
Please see Attached photo of content and category table
First pic is of content table
Second pic is of category table
public function AllStories()
{
$cats = DB::table('content')
->join('category', 'content.Genres', '=', 'category.Genres')
->get();
$AllStories=Content::all();
return View::make('AlLStories')->with('AllStories',$AllStories)->with('cats',$cats);
}
now I have to fetch name from that value which is in category table