Hi,
I've a resource that uses a custom query to join two tables. Both tables have a column with name 'email' that represent different information.
$query->join("TableA","TableA.colName","=","TableB.colName")
->select("col1", "col2")
->select("TableA.email")
->select(...);
In fields function I have
Text::create("email")
->formatUsing(function($value,$row){
return $row['email'];
})
->colName("TableA.email")
->label("Email")
->searchable(true)
->validators([
RequiredFieldValidator::create(),
EmailValidator::create(),
]),
This works for detail view, list view. Now when I go to update view, the field "Email" is not populated. How do I make resource work with joins on table having similar column names.