I want to download 2 user's data from tables, I want to generate excel file of that data.
here is the download function for only one data table called registerdetails.
public function export(){
$items = registerdetails::all();
Excel::create('General Trainee Details', function($excel) use($items){
$excel->sheet('Sheet 1', function($sheet) use($items){
$sheet->fromArray($items);
});
})->export('xlsx');
}
I need this controller to be modified get datas from registerdetails and bankdetails. if anyone can help me to get this solved?