master
Rustem 2025-06-16 17:47:43 +05:00
parent f66ef5c75c
commit dc4bc7f88b
1 changed files with 2 additions and 6 deletions

View File

@ -524,12 +524,8 @@ class MobileApiController extends Controller
{
$subcategory = $request->query('subcategory');
$query = UniModel::model('pipi_faq');
if (isset($subcategory)) {
dd($subcategory);
$query->where('subcategory', $subcategory);
}
$text = $query->first()?->text;
$query = UniModel::model('pipi_faq')->where('subcategory', $subcategory)->first();
$text = $query?->text;
return response()->json($text ?? '');
}