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 laravel.com #
 
PREVIOUS NEXT
Tagged: #join #laravel
ADD COMMENT
Topic
Name
8+7 =