jqhph / dcat-admin

🔥 基于 Laravel 的后台系统构建工具 (Laravel Admin),使用很少的代码快速构建一个功能完善的高颜值后台系统,内置丰富的后台常用组件,开箱即用,让开发者告别冗杂的HTML代码
http://www.dcatadmin.com
MIT License
3.87k stars 704 forks source link

SelectTable model 方法如何能顯示組合欄位? #2035

Closed mbdmt closed 10 months ago

mbdmt commented 1 year ago

Description:

我想要選擇後回貼顯示兩個欄位組合的值 例如 姓名+email這樣

Steps To Reproduce:

$form->selectTable('members_id','選擇會員') ->from(UserTable::make()) ->model(Models\Member::class, 'id', 'MyTitle') ->required();

嘗試models裡用訪問器自訂欄位名, 但無效

public function getMyTitleAttribute()
{
    return "{$this->name} {$this->email}";
}

加在titleColumn也不支援訪問器 $grid->rowSelector()->titleColumn('MyTitle');

stale[bot] commented 10 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.