使用BotMan \ BotMan \ Messages \ Conversations \ Conversation;使用BotMan \ BotMan \ Messages \ Incoming \ Answer;使用BotMan \ BotMan \ Messages \ Outgoing \ Question;使用App \ Models \ ProductCategory;使用App \ Models \ Product; OrderConversation类扩展了Conversation {受保护的$ ID_product;受保护的$ info_pro; public function order(){$ this-> ask('Type ID product:',function(Answer $ answer){//保存结果$ this-> ID_product = $ answer-> getText(); $ this-> say( '产品信息:'。$ this-> ID_product。$ product = Product :: where('id',$ id)); $ this-> bot-> userStorage()-> save(['ID_product'=> $ answer-> getText(),]); }); }