modifyQueryUsing with a role
hi guys, I have this query in the table function in my productResource but I only want to apply it when the user does not have the 'Admin' role, is there a way to do it?
->modifyQueryUsing(fn (Builder $query): Builder => $query->where('country_id', auth()->user()->country_id))
->modifyQueryUsing(fn (Builder $query): Builder => $query->where('country_id', auth()->user()->country_id))