master
cody 4 months ago
parent 8bdaee161a
commit a6dc7589bf

@ -50,7 +50,7 @@ class BaseController extends CommonController
public function index()
{
$all = request()->all();
$list = $this->model->withCount('emailRecords')->with(underlineToHump($all['show_relation'] ?? []))->where(function ($query) use ($all) {
$list = $this->model->with(underlineToHump($all['show_relation'] ?? []))->where(function ($query) use ($all) {
if (isset($all['filter']) && !empty($all['filter'])) {
foreach ($all['filter'] as $condition) {
$key = $condition['key'] ?? null;

@ -54,7 +54,7 @@ class EmailTemplateController extends BaseController
public function index()
{
$all = request()->all();
$list = $this->model->where(function ($query) use ($all) {
$list = $this->model->withCount('emailRecords')->where(function ($query) use ($all) {
if (isset($all['filter']) && !empty($all['filter'])) {
foreach ($all['filter'] as $condition) {
$key = $condition['key'] ?? null;

Loading…
Cancel
Save