Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel merge two query builder

$page = Page::select('id as page_id','name_en as page_name');
        $data['permissions'] = Permission::where('role_id', $id)->joinSub($page,'permissions_page',function($join){
            $join->on('permissions.page_id','=','permissions_page.page_id');
        })->get();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #merge #query #builder
ADD COMMENT
Topic
Name
5+4 =