json($arr); } static function Error($msg,$arr=[]) { $arr["result"]="error"; $arr['message']=$msg; return response()->json($arr); } static function Debug($data) { return response()->json(["result"=>"debug", "data"=>$data]); } static function Unauthorized($arr=[]) { $arr["result"]="unauthorized"; return response()->json($arr); } static function Forbidden($arr=[]) { $arr["result"]="forbidden"; return response()->json($arr); } }