This commit is contained in:
root 2019-12-13 15:16:44 +08:00
parent b26c5be030
commit 24eda59e48

View File

@ -67,9 +67,12 @@ class TicketController extends Controller
}
public function reply (Request $request) {
if (empty($request->input('id')) || empty($request->input('message'))) {
if (empty($request->input('id'))) {
abort(500, '参数错误');
}
if (empty($request->input('message'))) {
abort(500, '消息不能为空');
}
$ticket = Ticket::where('id', $request->input('id'))
->where('user_id', $request->session()->get('id'))
->first();