From 3a97c98797da1ca6ea4faa05b0b0dd98e36fd3ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Sat, 6 Mar 2021 11:39:36 +0300 Subject: [PATCH] check if is api --- app/Models/Common/Company.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Common/Company.php b/app/Models/Common/Company.php index c5d0452d7..2a521664c 100644 --- a/app/Models/Common/Company.php +++ b/app/Models/Common/Company.php @@ -319,7 +319,7 @@ class Company extends Eloquent $query = user()->companies()->usingSearchString($search)->sortable($sort); - if ($request->expectsJson()) { + if ($request->expectsJson() && $request->isNotApi()) { return $query->get(); }