Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

joshua_b's avatar

joshua_b liked a comment+100 XP

4mos ago

Inertia 2 Unleashed: Ep 1, Polling

How would you refactor this if you only wanted to refetch the number of comments and not the entire project.

Would that even be possible?

joshua_b's avatar

joshua_b liked a comment+100 XP

4mos ago

Inertia 2 Unleashed: Ep 1, Polling

@joshua_b, Comments are related to the projects so no. I can't think of a way where you can grab the comments without querying the project they belong to.

joshua_b's avatar

joshua_b wrote a comment+100 XP

4mos ago

Inertia 2 Unleashed: Ep 1, Polling

How would you refactor this if you only wanted to refetch the number of comments and not the entire project.

Would that even be possible?

joshua_b's avatar

joshua_b wrote a comment+100 XP

4mos ago

Jeremy's Larabits: Ep 20, Better Forms, Less Effort

@daniel-eppler That is the first thing I thought when seeing the function.

On the other hand I can see lots of use-cases where being able to circle between a subset of elements would helpful.

joshua_b's avatar

joshua_b liked a comment+100 XP

4mos ago

Jeremy's Larabits: Ep 29, Should You Use Big Models or Services?

I tend to like fat models, because I think that they're more than just data, they are "entities". So they perform actions as well. But I extract the code sometimes when it makes sense for me. So, like Povillas would say: it depends.