/** * Updates the emergency text */ public function post(Request $request) { $json = json_encode(array('input' => $request->input('input'), 'state' => $request->input('state'))); if (Log::updateLogEmergency('emergency', $json)) { return response()->json(['contents' => json_decode(Log::getEmergency()->get()->first()['json'])]); } }