public function message(Request $request){ return DB::table('My') -> insert($request ->get()) ? '留言成功' : '留言失败';}
以前一直不知道三元运算符中 , 句子里嵌入 return 会报语法错误 , 原来 return 要加在最前面返回 , 这样写才正确;