added api macros to request

This commit is contained in:
Denis Duliçi
2021-01-19 14:12:54 +03:00
parent 9269b93e3d
commit f7bc89806c
5 changed files with 14 additions and 4 deletions

View File

@@ -90,7 +90,7 @@ abstract class Model extends Eloquent
$query->usingSearchString($search)->sortable($sort);
if ($request->expectsJson()) {
if ($request->expectsJson() && $request->isNotApi()) {
return $query->get();
}