如何使用Laravel框架的两个函数分别从两个不同的表检索数据到一个视图?

问题描述

我使用了两个控制器来编写这两个函数,并使用了两个不同的变量名来将数据传递给视图。 这是我的控制器1 enter image description here

这是视图中的代码 this is working without any error. all the details are displaying.

这是我的控制器2 enter image description here

这是控制器2功能视图中的代码the error occurs in here. error is about $pro is undefined. can anyone help me to solve this error?

我以前使用一个控制器和两个模型。但是那个时候也产生了同样的错误

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)