I'm trying to make simple forum on laravel. I have two tables:
categories:
forums:
I run query:
$categories = DB::table('forums')
->join('categories', 'forums.fid', '=', 'categories.cid')
->select('categories.*', 'forums.*')
->get();
I receive only two results:
[{"cid" :1,
"name": "First forum",
"fid": 1,
"seo_name": "first-forum",
"category_id": 1
},
{"cid": 2,
"name": "Another forum",
"fid": 2,
"seo_name": "another-forum",
"category_id": 2
}]
Why only 1 result for category_id 1? I have two forums in that category. Thanks in advance and sorry for my bad English.

