Back
In response to @MrPunyapal

It depends. 👀
If the traits are more generic and used across the app, `/app/Traits` makes sense. For model-specific behavior `/app/Models/Traits`. As for naming, 'Concerns' can highlight intent better, but 'Traits' is simpler — and ultimately, I think it's down to preference and convention.

1

158

  • No matching results...
  • Searching...

/ 1000

For traits that are designed for generic use, like they can be use in most of the classes, I prefer to put it on App/Traits. But if the trait can only be use for a very specific classes in a very particular way, I usually put them beside those classes directory, inside the Concerns. So for models, I do App/Models/Concerns

1

118