Joe

i’m honestly not sure why that requires a boolean param

Joe

on the plus side, I promise you’ll never forget how to use the ->distinct() function ever again 😂

r3v3rb

bugger! Could have kept my client happy 6 hours ago - nevermind 😄

Joe

yeah from the API docs it looks like it expects a boolean param

r3v3rb

What, I tried but missed the true!?!?! That's Friday for you !!! lol

Joe
  1. return SubCategory::get()->relation('Products')->exclude(['Bespoke'=>1])->filter(['ApprovedForUse'=>1])->distinct(true);