Search in morph to many relationships
I have a Payment Resource. In the payment model, I have a morph to relationship with payee
In the table, I have a column in which I show the code of the payee. The code is like this
I want to make this column searchable. Is there a way to achieve it?
I can only think of joining the tables in the Eloquent query and change the column definition using a case statement. But that is rather messy and would like to have a cleaner solution, if available.
Thanks in advance for any help.
In the table, I have a column in which I show the code of the payee. The code is like this
I want to make this column searchable. Is there a way to achieve it?
I can only think of joining the tables in the Eloquent query and change the column definition using a case statement. But that is rather messy and would like to have a cleaner solution, if available.
Thanks in advance for any help.