I like the idea, but has anybody performance tested this? What happens when you're dealing with thousands of rows of data that pass every item along as class instants vs primitive types?
This week’s The Payload newsletter is out. It has the latest news and more in the Symfony, Drupal, PHP, Cybersec, and Fediverse development communities.
We had a great time at the #CMS Experts Group in Berlin, engaging in meaningful conversations and gaining valuable insights. Our team covered the recent General Assembly in Zurich and our upcoming communication strategies. A big thank you to Janus Boye for hosting us. #TYPO3#TYPO3CMS
Using global query scopes for simple one-to-many tenancy.
Code example of a #Laravel cat pension #SaaS app I've started and never finished. It's structured like this:
A user belongs to a pension
A pension has many clients
A client has many animals
Users (cat pension owners and their employees) can only view clients and animals from the same pension. Global query scopes ensure this rule is consistently applied throughout the app without accidentally forgetting it somewhere in your code.