Postingan lainnya
cara menggunakan DataTable dan create pdf di laravel
maaf gan minta pencerahan nih, ada referensi ga buat sya?? ,cara membuat Data Table dan cara create pdf di laravel hehehehe ,maaf masih newbe bnget
3 Jawaban:
panggil jquery + css datatable <pre> <link rel="stylesheet" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css"> <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> <script type="text/javascript" src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script> </pre>
contoh datatable <pre> <table id="example" class="mdl-data-table stripe" style="width:100%"> <thead> <tr> <th>ID Document</th> <th>No Document</th> <th>Approval Type</th> <th>Link</th> </tr> </thead> <tbody> <tr> <td> haha 1 </td> <td> haha 2 </td> <td>haha 3</td> <td> <a href="{{ url('/buatdoc') }}"> Click Here </a> </td> </tr> </tbody> </table> </pre>
jquery datatable <pre> <script type="text/javascript"> $(document).ready(function() { $('#example').DataTable( { columnDefs: [ { targets: [ 0, 1, 2 ], className: 'mdl-data-table__cell--non-numeric' } ] } ); } ); </script> </pre>
untuk pdf sy belum buat hehe
versi datatable : https://datatables.net/extensions/buttons/examples/html5/pdfPage.html versi library laravel : https://yajrabox.com/docs/laravel-datatables/master/buttons-export