Skip to content

Commit

Permalink
Update Amis.php
Browse files Browse the repository at this point in the history
  • Loading branch information
krissss authored Aug 17, 2022
1 parent f9f3e49 commit 72de27a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Amis.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function response(array $data, string $msg = '', array $extra = []): Resp
$data = array_merge([
'status' => $msg ? 1 : 0,
'msg' => $msg,
'data' => $data ?? '{}',
'data' => $data ?: '{}',
], $extra);

return json($data, JSON_UNESCAPED_UNICODE);
Expand Down Expand Up @@ -86,4 +86,4 @@ public function renderPage(string $title, array $schema = [])

return Raw::render($data['view'], $data, $data['view_path']);
}
}
}

0 comments on commit 72de27a

Please sign in to comment.