datatables ->of($this->query()) ->make(true); } /** * Get the query object to be processed by datatables. * * @return \Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder */ public function query() { $$MODEL_NAME_PLURAL_CAMEL$ = $MODEL_NAME$::select(); return $this->applyScopes($$MODEL_NAME_PLURAL_CAMEL$); } /** * Optional method if you want to use html builder. * * @return \yajra\Datatables\Html\Builder */ public function html() { return $this->builder() ->columns([ $FIELDS_DATA$ ]) ->parameters([ 'dom' => 'Bfrtip', 'buttons' => ['csv', 'excel', 'pdf', 'print', 'reset', 'reload'], ]); } }