update
This commit is contained in:
@ -56,15 +56,4 @@ class ArticlesController extends AbstractController
|
||||
'message' => 'ok'
|
||||
];
|
||||
}
|
||||
|
||||
#[RequestMapping(path:'brand-search', methods: 'get')]
|
||||
public function brandSearch(): array
|
||||
{
|
||||
$input = $this->request->input('brand');
|
||||
$query = Model::query()->select(['name', 'cn_name', 'id'])->where('name', 'like', "%$input%")
|
||||
->orWhere('cn_name', 'like', "%$input%")
|
||||
->get()->toArray();
|
||||
|
||||
return ['code' => 0, 'msg' => 'ok', 'data' => $query];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user