ajax()) { return DataTables::of(Invoice::all()) ->make(true); } $builder->addAction(); $builder->addCheckbox(); $html = $builder->columns([ ['data' => 'checkbox', 'name' => 'checkbox', 'title' => '', 'searchable' => false, 'orderable' => false], ['data' => 'invoice_number', 'name' => 'invoice_number', 'title' => trans('texts.invoice_number'), 'visible'=> true], // ['data' => 'full_name', 'name' => 'full_name', 'title' => trans('texts.contact'), 'visible'=> true], // ['data' => 'email', 'name' => 'email', 'title' => trans('texts.email'), 'visible'=> true], // ['data' => 'created_at', 'name' => 'created_at', 'title' => trans('texts.date_created'), 'visible'=> true], // ['data' => 'last_login', 'name' => 'last_login', 'title' => trans('texts.last_login'), 'visible'=> true], // ['data' => 'balance', 'name' => 'balance', 'title' => trans('texts.balance'), 'visible'=> true], // ['data' => 'action', 'name' => 'action', 'title' => '', 'searchable' => false, 'orderable' => false], ]); $builder->ajax([ 'url' => route('client.invoices.index'), 'type' => 'GET', 'data' => 'function(d) { d.key = "value"; }', ]); $data['html'] = $html; return view('portal.default.invoices.index', $data); } /** * Display the specified resource. * * @param \App\Models\Invoice $invoice The invoice * * @return \Illuminate\Http\Response */ public function show(Invoice $invoice) { } /** * Perform bulk actions on the list view * * @return Collection */ public function bulk() { } }