InfyOmLabs / adminlte-generator

Boilerplate of Laravel with InfyOm Laravel Generator for AdminLTE Templates
https://infyom.com/open-source/laravelgenerator/docs/8.0/boilerplates
388 stars 273 forks source link

Datatables not showing anything #75

Closed RayhanYulanda closed 4 years ago

RayhanYulanda commented 4 years ago

I tried to add, it works perfectly and added in my database but i cant see my data in datatables

mitulgolakiya commented 4 years ago

Maybe this video can help you: https://www.youtube.com/watch?v=YC0YXrAF4SA

Or re-open the issue with more details please.

RayhanYulanda commented 4 years ago

I have followed what the video did but still cant work @mitulgolakiya

mitulgolakiya commented 4 years ago

@RayhanYulanda Please post the exact error that you are getting.

versatilegurung commented 3 years ago

I tried everything but am unable to get datatables, can you help how can this be acheived?

mlajx commented 3 years ago

I think I found out why this is happening.

When a file is generated by the infyom command, resources/views/{name}/table.blade.php is created and there are:

@push('third_party_scripts')
    @include ('layouts.datatables_js')
    {!! $dataTable->scripts() !!}
@endpush

but @push is used for @stack (doc) and resources/views/templates/app.blade.php has @yield('third_party_scripts').

So when I change @yield('third_party_scripts') to @stack('third_party_scripts'), the table worked normally.