Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

join in laravel

$subCategories = Subcategory::join('categories', 'subcategories.category_id', '=', 'categories.id')
                              ->select('subcategories.*', 'categories.name AS cname')
                              ->orderBy('id', 'desc')
                              ->get();
Source by learninglaravel.net #
 
PREVIOUS NEXT
Tagged: #join #laravel
ADD COMMENT
Topic
Name
6+2 =