_stefanzweifel’s avatar_stefanzweifel’s Twitter Archive—№ 2,569

          1. …in reply to @warsh33p
            @warsh33p here we go ↓ - How should we store conditions for more complex operators? ("string contains value", "date between x and y") - How to translate the conditions to an Eloquent query? - (Bonus: "and" and "or" connectors for conditions)
        1. …in reply to @_stefanzweifel
          @warsh33p - How to represent available action in the db? How do you define the arguments of an Action? eg. "a list of users of team", "a date range in the future" [^1] [^1] Keeping Actions and arguments is prob. easier to keep just in PHP classes. But how do you buld the UI?
      1. …in reply to @_stefanzweifel
        @warsh33p - How do you design the API so the consumer can "hook" into it without overriding methods and classes (callbacks? events?) - When a rule is evaluated, should we store the result? How can we store the context that lead to the execution of the rule? How granular is the data?
    1. …in reply to @_stefanzweifel
      @warsh33p Just some thoughts that went through my head when I was building my current implementation. I've also discovered Ruler which seem to do a lot right: github.com/bobthecow/Ruler
  1. …in reply to @_stefanzweifel
    @warsh33p And writing this stuff out revealed that I probably could improve my current implementation by making it stateless than store results in the DB. Thanks for being my rubber duck! 🦆