Multiple data source, one datatable #3033
              
                
                  
                  
                    Answered
                  
                  by
                    yajra
                  
              
          
                  
                    
                      taufiqridha
                    
                  
                
                  asked this question in
                Q&A
              
            -
| Hi is there anyone has successfully implement multiple data source to one datatable ? any advice would be thankful | 
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            yajra
          
      
      
        Jul 31, 2023 
      
    
    Replies: 2 comments 2 replies
-
| You can use DataTableHtml. php artisan datatables:make Demo --builderThis will create  Controller    public function index(UsersDataTable $dataTable)
    {
        $demo = DemoDataTableHtml::make();
        
        return $dataTable->render('users::index', compact('demo'));
    }View{{ $dataTable->table() }}
{{ $demo->table() }}
@push('scripts')
{{ $dataTable->scripts() }}
{{ $demo->scripts() }}
@endpush | 
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            -
| For multiple data sources, we usually use  | 
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            
      Answer selected by
        taufiqridha
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
For multiple data sources, we usually use
UNIONSQL.