laravel-admin同一个页面两个grid怎么分别导出各自的数据?
- Laravel Version: 6.2
- PHP Version: 7.3
- Laravel-admin: 1.8
protected function grid()
{
$tab = new Tab();
$tab->add('图片', $this->results('image')->render(), true);
$tab->add('文章', $this->results('post')->render());
return $tab;
}
public function results($type)
{
$grid = new Grid(new Result());
$grid->setName($type . 'Results');
$grid->model()->whereHasIn($type);
// 省略其余代码
}
这样两个tab分别显示图片数据和文章数据,怎么才能两个tab里分别导出各自的数据呢?
自定义按钮处理吧