Hello, I am fetching the data from excel file to be shown in laravel blade template, so the excel files are randon and I cannot have static column names in ajax, how to overcome this problem?
If you need to retrieve data from Excel files with random column names but cannot use static column names in your AJAX request, you can use a PHP library like PHPExcel to dynamically retrieve the column names from the Excel file.
Excelent tutorial!!! Congratulations!!!
5:27
not inside of resources/css/app.css
but inside of resources/sass/app.scss
i have 3 rows data, but when i export pdf just 1 rows display?
Hello, I am fetching the data from excel file to be shown in laravel blade template, so the excel files are randon and I cannot have static column names in ajax, how to overcome this problem?
If you need to retrieve data from Excel files with random column names but cannot use static column names in your AJAX request, you can use a PHP library like PHPExcel to dynamically retrieve the column names from the Excel file.
@@sojhodeveloper So, dynamically retrieving it but how will I implement the datatables after?
Follow Datatables guide.
Hi, how to add action button in last of row, like edit, delete?
public function getDataTableData(){
$employees = Employees::select('*');
return Datatables::of($employees)
->addIndexColumn()
->addColumn('status', function($row){
if($row->status == 1){
return "Active";
}else{
return "Inactive";
}
})
->addColumn('action', function($row){
// Update Button
$updateButton = "";
// Delete Button
$deleteButton = "";
return $updateButton." ".$deleteButton;
})
->make();
}
@@sojhodeveloper public function getDataTableData()
add this script where?