Comments (4)
请提供 Laravel 和 administrator 的版本
from administrator.
laravel 5.5
administrator ^1.1
from administrator.
还有一个小问题就是,比如:
表A和表B,他们没有关系,我想在表A的配置中,生成一列,展示B中某一列(这一列由A表某值提供)的行数总和。
问题所在:
在A配置中可以获取某个值,但是在下一个配置数组中,无法保持这个值。
由于想展示的列,并不在A表字段中,所以无法共享当前value
例子:
获取表A 的openId
'info' => array(
'title' => 'info',
'output' => function ($value, $model) {
$openId = $model->openId;
......
},
),
在表B中使用
'test' => array(
'title' => 'count',
'output' => B::select('id',$openId)->count()
),
这个test列不再表A字段中,如果output使用闭包,则要求字段必须存在。。。
如果我想这么做,能实现吗?
from administrator.
请更新到最新
from administrator.
Related Issues (20)
- 是基于那个administrator版本改造的? HOT 2
- 代码导致无法进行route:cache
- 7.2版本下sizeof函数会报异常
- sizeof(): Parameter must be an array or an object that implements Countable HOT 2
- chrome 无法使用上传图片
- 后台筛选功能 502 跳转
- PHP 7.2 + 以上的版本不兼容问题
- 不支持 laravel 5.2+ ? HOT 1
- fix n+1 HOT 1
- Laravel5.5中关联模型报错,getOtherKey(),getPlainForeignKey HOT 1
- 可以支持5.7吗
- 请问怎么重写编辑和保存方法在配置里 HOT 1
- 包安装问题
- Enum下拉框的存储有点小问题 HOT 3
- 编辑部分select是否支持联动
- 已支持 Laravel 5.3 ✅ HOT 1
- 关于 PHP7 Bool 保留关键词冲突问题 HOT 1
- 编辑状态下图片上传组件点了没反应 HOT 1
- 支持 5.4, 5.5 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from administrator.