yajra datatables html column bulder example

Solutions on MaxInterview for yajra datatables html column bulder example by the best coders in the world

showing results for - "yajra datatables html column bulder example"
Máximo
16 Feb 2018
1 public function getMethod(Request $request, Builder $htmlBuilder)
2 {
3     if ($request->ajax()) {
4         return Datatables::of(User::select(['id', 'name', 'email', 'created_at', 'updated_at']))->make(true);
5     }
6     $html = $htmlBuilder->addColumn(['data' => 'id', 'name' => 'id', 'title' => 'Id'])->addColumn(['data' => 'name', 'name' => 'name', 'title' => 'Name'])->addColumn(['data' => 'email', 'name' => 'email', 'title' => 'Email'])->addColumn(['data' => 'created_at', 'name' => 'created_at', 'title' => 'Created At'])->addColumn(['data' => 'updated_at', 'name' => 'updated_at', 'title' => 'Updated At']);
7     return view('datatables.html.method', compact('html'));
8 }
similar questions