【发布时间】:2020-08-20 13:57:30
【问题描述】:
我想在同一个视图中显示两个不同的表记录。我该怎么做?
模型数字化顺序
namespace App;
use Illuminate\Database\Eloquent\Model;
class Digitizingorder extends Model
{
protected $table="digitizing_orders";
protected $fillable =['id','order_name','height','width','image', 'order_placement','required_format','order_fabric','instruction','user_id'];
}
模型向量顺序
namespace App;
use Illuminate\Database\Eloquent\Model;
class Vectororder extends Model
{
protected $table ="vector_orders";
protected $fillable =['id','vector_name','height','width','image','color', 'order','order_fabric','instruction','user_id'];
HTML 视图
<table id="selection-datatable" class="table table-sm mb-2">
<thead>
<tr>
<th>S.N </th>
<th>Order No</th>
<th>Design Name </th>
<th>Order Type</th>
<th>Received Date</th>
<th>Released Date </th>
<th>price</th>
<th>Order Details</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
【问题讨论】:
-
你的问题看不懂。。请展示你做了什么,你想要什么,先自己尝试
-
其实我想在同一个视图中显示两个不同表的记录
标签: laravel