Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function tabulator(){
- DB::select("CALL report1a_respublika('2000/01/01', '2023/01/01')");
- $one = DB::select("SELECT * FROM test");
- $one = json_encode($one);
- return view ('reports.tabulator', compact('one'));
- {{-- tabulator tables --}}
- <div style='display:none' id="tableZero"></div>
- <div id="tableOne" style="margin-top:15px"></div>
- {{-- tabulator script --}}
- <script>
- //define data for table1
- var tabledata1 = {!!$one!!}
- var table0 = new Tabulator("#tableZero", {
- layout: "fitDataFill", //fit columns to width of table (optional)
- autoColumns: true,
- });
- //define table1
- var table1 = new Tabulator("#tableOne", {
- data: tabledata1,
- autoColumns:true,
- layout:"fitDataFill",
- movableColumns:true,
- selectable:true,
- clipboard:true,
- });
- //trigger download of data.xlsx file
- var sheets = {
- "sheetA": table1,
- };
- downloadXlxs = function(){
- table0.download("xlsx", "report.xlsx", {sheets:sheets});
- };
- </script>
- Replace Period '.' with .
- .u0411u0438u0448u043au0435u043a":12,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement