Replies: 1 comment
-
I've got a PR pending to enable adding custom SelectRaw items, I've just been hesitant due to the potential security risks it poses. Your implementation should be fine, but you'll probably need to use the format or label functions on the column to get the field to display. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is it possible handle custom public function builder(): Builder with complex query?
eg.
public function builder(): Builder
{
return Reports::from('tblReports as R')
->join(DB::raw("tblTaskProjects as TP"), "R.project_id", "TP.task_project_id")
->join(DB::raw("tblReportStates as RS"), "R.state_id", "RS.state_id")
->where("R.report_type", "project")
->selectRaw("R.*, TP.fiscal_ui42Company company");
}
Regards,
Andrej Nagy.
Beta Was this translation helpful? Give feedback.
All reactions