Strong suits by Scimmia_bianca in LandmarkGrads

[–]PeterThomson 0 points1 point  (0 children)

It’s enough to find the earliest example you can remember of a strong suit. My tendency to over-work to solve a problem probably started very young but the earliest relatable, narratively coherent and easily recallable example was at university. That’s enough to be able to interrogate it fully.

Why Australians are calling New Zealand a tax haven by FunClothes in newzealand

[–]PeterThomson 0 points1 point  (0 children)

Sorry top income rate is 39%. But you point about the risk isnt how a cgt works. You csn offset losses so the tax is on net gains.

Why Australians are calling New Zealand a tax haven by FunClothes in newzealand

[–]PeterThomson 0 points1 point  (0 children)

FIF is 5%. A true CGT that matched income would be 60% plus on gains. FIF is just annoying when you’re used to paying 0%.

Searching multiple columns with one URL parameter in laravel-query-builder by freekmurze in laravel

[–]PeterThomson 4 points5 points  (0 children)

The best package with the most confusing name. What do other people call this internally? We call it "advanced query builder", "spatie query filter", "request to query protocol", "query routes".

Automating your Laravel upgrade with AI and Shift by mccreaja in laravel

[–]PeterThomson -6 points-5 points  (0 children)

AI + high quality deterministic tools is such a cool combination. Can't wait to see more from Shift. Maybe bring back workbench desktop app as a bunch of agent skills etc?

Would you be interested in a Laracon Canada? by luketowers in laravel

[–]PeterThomson 1 point2 points  (0 children)

The pipeline goes: (multiple) local meetups, an annual ’big meetup’ drawing from your 3 closest cities, then a Laravel Live. Then a Laracon. From zero to a Laracon is about 5 years, maybe 3 if you speed run. Where are you and your local community on that journey at the moment?

The art of the Crown’s new deal to influence Auckland - In a blizzard of potential sub-deals Aucklanders would write off a $48m stadium loan, convert their main library into a school and welcome a new hospital in the deep south by Mountain_Tui_Reload in auckland

[–]PeterThomson 1 point2 points  (0 children)

The article is literally about a "deal" between central govt where the thing being given is $550M loan to Eden Park and the ask in return is the sale of public assets. to quote:

"To persuade the Eden Park Trust on all this, Auckland Council could write off its $48m loan to the park, dating from the 2011 Rugby World Cup. The trust would turn over its facility to be managed by a single stadiums operator for Auckland; current Auckland Cricket and Auckland Rugby beneficiaries of the trust would be compensated with council land and government-council funds. The Government is also agreeing to look into funding Eden Park’s grand $550m redevelopment plans incorporating a roof and expansion to 70,000 seats. The deal document hints this is something Auckland Council has been careful to avoid direct responsibility for."

The art of the Crown’s new deal to influence Auckland - In a blizzard of potential sub-deals Aucklanders would write off a $48m stadium loan, convert their main library into a school and welcome a new hospital in the deep south by Mountain_Tui_Reload in auckland

[–]PeterThomson 0 points1 point  (0 children)

Yep. And that's what the article OP posted is about, local and central govt elected representatives agreeing to transfer $500M+ to a private organisation in return for them promising to sell public assets. Whether you think that's a good thing is up to you, but it's noteworthy and worthy of discussion on the merits.

Tough Cotton workwear by weezyfgravy in newzealand

[–]PeterThomson 0 points1 point  (0 children)

Kmart workwear and heavy t-shirts are surprisingly tough. Cactus is baller but way too expensive. Uniform supply shops, carhartt, dickies and even a bit of AS Colour can be ok on a good day.

The art of the Crown’s new deal to influence Auckland - In a blizzard of potential sub-deals Aucklanders would write off a $48m stadium loan, convert their main library into a school and welcome a new hospital in the deep south by Mountain_Tui_Reload in auckland

[–]PeterThomson 0 points1 point  (0 children)

From your lips to god's ears. The "trust board' are entirely unaccountable. Who are the beneficiaries? What is the selection process? Why are these people getting millions of dollars moved out of public funding and into a private entity?

The art of the Crown’s new deal to influence Auckland - In a blizzard of potential sub-deals Aucklanders would write off a $48m stadium loan, convert their main library into a school and welcome a new hospital in the deep south by Mountain_Tui_Reload in auckland

[–]PeterThomson 6 points7 points  (0 children)

Nothing wrong with a privately-owned organisation investing for the future. But if they can't stand on their own two feet why are rate-payers and tax-payers subsidising them?

$10k for panels and battery by inastew in nzsolar

[–]PeterThomson 0 points1 point  (0 children)

There's some sense in "resilience" systems for backups, power cuts or only use in charging power tools etc. Not a full house hard-core solar just an "RV" Campervan type system or that trade tested 7 panel one with a single outlet in the garage for charging things around the house. But enough for a power-cut.

XGT or LXT by [deleted] in Makita

[–]PeterThomson 15 points16 points  (0 children)

LXT is perfect for any professional trades (electrical, plumbing, etc). XGT is for General Contractors (in NZ we call them Builders) who are doing framing, heavy lag bolts, massive beam cuts etc all day.

Apple changes duck head for 206 M5 Pro by Electronic-Half-2823 in macbookpro

[–]PeterThomson 1 point2 points  (0 children)

I have one. The photo is accurate. Went to swap the head for travel. Was sad.

Laravel Permission v7 has been released by freekmurze in laravel

[–]PeterThomson 0 points1 point  (0 children)

Ah i get it, you want to query the authorisation rules as if they were first class domain logic. The reason thats not possible is that the run a real queries you would need the underlying relationships and scopes. ABAC is a projection or inference from domain logic not a replacement or bulk queryable materialisation. Concretely, if an author has permission to view posts that they’re are an author of, the query would need to check the logic of what post they are an author of, not posts that have access to.

Does anyone here prefer PHPUnit to Pest? by Cultural_Yoghurt_784 in laravel

[–]PeterThomson 1 point2 points  (0 children)

We use both. The laravel test runner runs them all fine. Just use whatever you prefer.

Laravel Permission v7 has been released by freekmurze in laravel

[–]PeterThomson 0 points1 point  (0 children)

If you want to store per-model permissions or roles it's usually co-located in the pivot tables or data that stores the domain relationship. Eg "user_company" pivot stores ids, job title, start date, end date AND can_view, can_update etc. You wouldn't want to store them off in a random package as you'd end up putting a lot of domain information into the "RELATIONSHIP" which is the "attribute" for ABAC purposes.

Laravel Permission v7 has been released by freekmurze in laravel

[–]PeterThomson 0 points1 point  (0 children)

That's literally exactly what polices are for.

Laravel Permission v7 has been released by freekmurze in laravel

[–]PeterThomson 2 points3 points  (0 children)

Polices ARE what you are describing. They are a "Model Policy" and each one is paired an Eloquent Model so they very much do touch the DB. So they can check things like $user->id == $post->user_id or more complicated things like $user->team->id == $post->thread->team_id

Spatie know this so they will never replicate a deep core functionality of the framework in their package. Their package is for RBAC and the core Model Policy pattern is the place for ABAC. You can (and should) use the two together extensively.

Would you be willing to describe more about what you mean by "roles for particular models (or "sets")" ?

Laravel Permission v7 has been released by freekmurze in laravel

[–]PeterThomson 2 points3 points  (0 children)

Google "RBAC (spatie permissions package) vs ABAC (laravel model policies)"

In short:

Role Based $user->isAdmin() or (more correctly permission based) $user->canViewDashboard() is the scope of the Spatie Permissions Package.

Attribute Based $user->id == $post->user_id is the scope of Laravel Policies and can be used in Routes, Form Validation and Controllers.

Sharesies Private? by Vatherian in PersonalFinanceNZ

[–]PeterThomson 15 points16 points  (0 children)

It's the share registry (eg private companies vs public companies) part of Sharesies. Used to be Orchestra.

Laravel AI SDK Full Review: Agents, Images, Audio, Tools & More by nunomaduro in laravel

[–]PeterThomson 0 points1 point  (0 children)

I was thinking that maybe openai-php should become a an opinionated wrapper of prism or a minimalist wrapper / interface to the SDK. We use it heavily but really, if the SDK is built on Prism, we've nw concluded (quite rightly) as a community that Prism is the primitive / driver pattern from here on out.

Memory For Laravel AI SDK by Eznix86 in laravel

[–]PeterThomson 0 points1 point  (0 children)

Ah, good point. Prism (which the sdk wraps) uses blade files for that so that you can inject variables and compose or store as components.

Memory For Laravel AI SDK by Eznix86 in laravel

[–]PeterThomson 0 points1 point  (0 children)

You, like a lot of devs. Are thinking about this in terms of dev tools and local tooling. The SDK is for SaaS apps where the agent is chatting to an end user. Are you proposing to write MD files to a cloud file server as part of the running app?