Non-static method Chumper\Datatable\Datatable::collection() should not be called statically, assuming $this from incompatible context
I don't know why it isn't working. this is my master page.
{!! HTML::script('//code.jquery.com/jquery-1.11.3.min.js') !!} {!! HTML::style('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css') !!} {!! HTML::style('https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.5/flatly/bootstrap.min.css') !!} {!! HTML::style('https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css') !!} {!! HTML::style('//cdn.datatables.net/1.10.7/css/jquery.dataTables.min.css') !!} {!! HTML::style('//cdn.datatables.net/plug-ins/1.10.7/integration/bootstrap/3/dataTables.bootstrap.css') !!} {!! HTML::style('css/app.css') !!} {!! HTML::style('css/card.css') !!}@include('partials.navbar')
{!! HTML::script('//code.jquery.com/jquery-migrate-1.2.1.min.js') !!} {!! HTML::script('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js') !!} {!! HTML::script('https://twitter.github.io/typeahead.js/releases/latest/typeahead.bundle.js') !!} {!! HTML::script('https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/3.0.3/handlebars.min.js') !!} {!! HTML::script('https://cdnjs.cloudflare.com/ajax/libs/jQuery-slimScroll/1.3.6/jquery.slimscroll.js') !!} {!! HTML::script('//cdn.datatables.net/1.10.7/js/jquery.dataTables.min.js') !!} {!! HTML::script('//cdn.datatables.net/plug-ins/1.10.7/integration/bootstrap/3/dataTables.bootstrap.js') !!} {!! HTML::script('js/app.js') !!}
and this where my controller
public function members($name, $team) { return Datatable::collection(User::all(array('id','name'))) ->showColumns('id', 'name') ->searchColumns('name') ->orderColumns('id','name') ->make(); }
and this is the call in the view