We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, any idea on how to add row button based on DB column value? I planned to add it on Action column
so far this is my code:
<?php namespace App\Admin\Controllers; use App\Http\Controllers\Controller; use Encore\Admin\Layout\Content; use Encore\Admin\Layout\Row; use Encore\Admin\Widgets\Box; use Encore\Admin\Widgets\Callout; use Illuminate\Support\Facades\DB; class ReportController extends Controller { public function index(Content $content) { return $content ->title($title = 'Report') ->row(function (Row $row) { $eval = DB::table('evaluations') ->select('admin_users.name', DB::raw('count(evaluations.employee_evaluated) as total_evaluated'),'evaluations.employee_evaluated') ->leftJoin('admin_users', 'admin_users.id', '=', 'evaluations.employee_evaluated') ->groupBy('evaluations.employee_evaluated', 'admin_users.name') ->orderBy('total_evaluated', 'DESC') ->get('total_evaluated', 'admin_users.name'); $OfficerEvaluatedSummary = view('admin.charts.OfficerEvaluatedSummary', compact('eval')); $row->column('12', new Box('Officer Evaluated Summary', $OfficerEvaluatedSummary)); })->row(function (Row $row) { // $bar = view('admin.chartjs.doughnut'); // $row->column(1/3, new Box('Doughnut chart', $bar)); // $scatter = view('admin.chartjs.combo-bar-line'); // $row->column(1/3, new Box('Chart.js Combo Bar Line Chart', $scatter)); // $bar = view('admin.chartjs.line-stacked'); // $row->column(1/3, new Box('Chart.js Line Chart - Stacked Area', $bar)); }); } }
<?php use Jxlwqq\DataTable\DataTable; // table $headers = ['Employee Evaluated', 'Total Evaluation', 'Action']; $rows = json_decode($eval); $style = ['table-bordered', 'table-hover', 'table-striped']; $options = [ 'paging' => true, 'lengthChange' => false, 'searching' => true, 'ordering' => true, 'info' => true, 'autoWidth' => true, ]; $dataTable = new DataTable($headers, $rows, $style, $options); echo $dataTable->render();
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi, any idea on how to add row button based on DB column value? I planned to add it on Action column
so far this is my code:
The text was updated successfully, but these errors were encountered: