如何将另一个实体的列值添加到lister CRUD?我有一个包含字段name和address的表company
,并希望将实体customer
中的列名写入到lister
中。我想要一个标题:
company.name、company.address和customer.name
我有两个带有关系方法的模型。我在这里找不到它。
https://laravel-backpack.readme.io/v3.0/docs/crud-full-api
这是可能的吗?我如何才能做到这一点?
发布于 2019-05-29 22:12:24
在模型中创建关系并使用whereHas
$this->crud->addClause('whereHas', 'customers', function($query) {
$query->customers();
});
https://stackoverflow.com/questions/56362270
复制相似问题