This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Im new to october and am trying to create a list filter where the user can select the merchant the transaction was processed by. heres my filter.yam code:
filter.yaml:
scopes:
merchant:
label: Merchant
scope: IsMerchant
options:
paypal: PayPay
worldpay: Worldpay
However Im not sure what i use in the Model for IsMerchant.
public function scopeIsMerchant($query)
{
WHAT GOES HERE?
}
Last updated
https://octobercms.com/docs/backend/lists#filter-scope-options
scope specifies a query scope method defined in the list model to apply to the list query, the first parameter will contain the filtered value(s).
So I suggest you do scopeIsMerchant($var1, $var2)
and then dd($var1)
and then dd($var2)
or use traceLog($var1)
to get to see what it contains
dump, traceLog and dd are your friends.
dump($this)
and dump(get_defined_vars())
have helped me a lot
1-4 of 4