mercredi 13 février 2019

Laravel & Html DataTable with Export buttons not showing or displaying

Why my export buttons like PDF, EXCEL CSV not showing or displaying on my page?

here is what my table looks like

enter image description here

here are my js links

enter image description here

    <table class="table" id="table_id">
        <thead>
          <tr>
            <th>EMPLOYEE NO.</th>
            <th>NAME</th>
            <th>DATE</th>
            <th>TIME IN</th>
            <th>TIME OUT</th>
            <th>TOTAL HOURS</th>
            <th>STATUS</th>

          </tr>
        </thead>
        <tbody>

                @foreach ($employeeSched as $setTime)
          <tr>
            <td><b></b></td>
            <td><b>, </b></td>
             <td><b></b></td>

             <td><input type="time" name="schedules[][timeIn]" class="form-control col-md-11" value=''></td>

            <td><input type="time" name="schedules[][timeOut]" class="form-control col-md-11" value=''></td>
            </td>
          </tr>
          @endforeach



        </tbody>
</table>



and my Script

@section('script')


<script type="text/javascript">
 $(document).ready(function() {
$('#table_id').DataTable( {
    dom: 'Bfrtip',
    buttons: [
        'copy', 'csv', 'excel', 'pdf', 'print'
    ]
} );

} );

and in my app.blade.php here are my links

links for scripts

   {!! Html::script('js/datatable/dataTables.buttons.min.js') !!}
{!! Html::script('js/datatable/buttons.flash.min.js') !!}
{!! Html::script('js/datatable/jszip.min.js') !!}
{!! Html::script('js/datatable/pdfmake.min.js') !!}
{!! Html::script('js/datatable/vfs_fonts.js') !!}
{!! Html::script('js/datatable/buttons.html5.min.js') !!}
{!! Html::script('js/datatable/buttons.print.min.js') !!}

links for css

 {!! Html::style('css/buttons.dataTables.min.css') !!}
{!! Html::style('css/jquery.dataTables.min.css') !!}



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire