Open xiaoyuebao opened 1 month ago
belongsTo 如何传递参数?
$form->belongsTo('author_id', Products::class, '商品'); 我想在Users::class里接收参数,请问如何实现呢
class Products extends Selectable { public $model = Product::class; public function make() { $this->model()->where('siteId',$siteId)->where('status',1) ->orderby('sort','desc'); $this->column('id'); $this->column('name','商品名称'); $this->column('unit_price','单价'); $this->column('cover','商品图片')->image(); $this->column('created_at'); $this->filter(function (Filter $filter) { $filter->disableIdFilter(); $filter->like('name'); }); } }
Description:
belongsTo 如何传递参数?
$form->belongsTo('author_id', Products::class, '商品'); 我想在Users::class里接收参数,请问如何实现呢