关联表中间表数据pivot 不能获取
@foreach ($products as $key => $v)
{{ $v->description }}
@foreach ($v->colors as $c)
{{ $c->pivot->colors_id }}
@endforeach
@endforeach
{!! $products->render() !!}
product
color_product
color
manytomany
查不到中间表的信息...求教
{{ $v->description }}
@foreach ($v->colors as $c)
{{ $c->pivot->colors_id }}
@endforeach
@endforeach
{!! $products->render() !!}
product
color_product
color
manytomany
查不到中间表的信息...求教
1 个回复
习惯把你宠坏
赞同来自: