Thursday, 12 October 2023

Laravel, how to change/rearrange datatable buttons and records entries?

My goal is to arrange button and other functionalities as show in the picture below:

enter image description here

How to,

  • make extra button and place at top left
  • put record entries and search bar side by side and place it at top right
  • excel and pdf at bottom left
  • pagination at bottom right

So far what I did was using dom, but the outcome is the record entries still at top left and no extra buttons at the top left.

dom: "lfrtpB",
pageLength: 10,
lengthMenu: [ 5, 10, 30, 50 ],
buttons: [
   {
       extend: 'pdf',
       exportOptions: {
           columns: [0,1,2,3]
       }
   },
   {
       extend: 'csv',
       exportOptions: {
           columns: [0,1,2,3]
       }
   },
   {
       extend: 'excel',
   }
],


from Laravel, how to change/rearrange datatable buttons and records entries?

No comments:

Post a Comment