inner join laravel examples
Example 1: laravel outer join
->join('answers as answers', 'responses.answer_id', '=', 'answers.id', 'left outer')
Example 2: join in laravel
$subCategories = Subcategory::join('categories', 'subcategories.category_id', '=', 'categories.id')
->select('subcategories.*', 'categories.name AS cname')
->orderBy('id', 'desc')
->get();