laravel 关联关系遍历数组的例子_php实例_脚本之家

$.ajaxSubmit({url:"{{url('/admin/commodity/update/'.$datas['id'])}}" ,

软件之家 ,1、控制器

{{$datas['name']}}

@if 上架中 @else 已上架 @endif

2、view

以上这篇laravel
关联关系遍历数组的例子就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

3、js 注意:jquery,jquery-form.js layer插件的引入 bootstrap相关的引入

public function show { $goods = Goods::select->where->get(); $data = []; foreach { $data[$key]['id'] = $v->id; $data[$key]['name'] = $v->name; $data[$key]['product_code'] = $v->product_code; $data[$key]['class_name'] = $v->goodsclass->class_name; $data[$key]['nums'] = $v->goodsNexus->count(); $data[$key]['price'] = $v->price; $data[$key]['goods_info'] = $v->goods_info; $data[$key]['img'] = $v->img; $data[$key]['site'] = $v->site; $data[$key]['work_company'] = $v->work_company; $data[$key]['status'] = $v->status; $data[$key]['area'] = $v->area; $data[$key]['product_at'] = $v->product_at; $data[$key]['created_at'] = $v->created_at; $data[$key]['productdate'] = $v->productdate; } $datas=$data;

->with //遍历到视图

发表评论