This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
alienv
Hello
I have a question about Record finder :
- is there a way to add a simple filter parameters to the builded query ? to ease filtering records i want to add a predefined type (eg WHERE type=1)
- descriptionFrom - is there a possibility to add some data from related table ?
Thanks in advance
axomat
You need to use searchScope for the first which is in the latest dev version. This allows you to use a scope method on the model. For the second I think what you want to use is the list option which allows you to choose any columns you like from the related table.
Igor Jacaúna
In my case, for the second question, I have an events plugin created by my self, and to export the subscriptions including user name subscribed, I defined the column like this:
name:
label: Name
searchable: true
relation: user
select: concat(name, ' ', surname)
The relation, is defined into the model like:
public $belongsTo = [
'user'=> 'Rainlab\User\Models\User'
];
1-3 of 3