Hi,
How to add column in users data table? For example, phone number column.
Thanks
1 Answers
Hello,
You can new columns from both Transformer and DataTable files for Object.
for example to add phone number for Users Table :
1) Corals/core/User/DataTables/UsersDataTable.php
Add :
'phone' => ['title' => trans('User::attributes.user.phome')
2) Corals/core/User/Transformers/UserTransformer.php
function transform(User $user)
'phone' => $user->phone,
Done, thank you
Please login or Register to submit your answer