Caleb White

Results 344 comments of Caleb White

@kayw-geek, There's an [open issue at PHPStan](https://github.com/phpstan/phpstan/issues/11857). In the meantime you can either: 1) ignore the error, or 2) remove `final` from the model in question

The PHPStan issue I mentioned has been completed so this issue can be closed @choco-cat, @szepeviktor

@szepeviktor, can you close this too? Thanks!

You need to add the using to the generics: `BelongsToMany`

What's the point of type-hinting contracts if you're not going to abide by them? Just a pet peeve of mine with the framework...

@canvural, using `newInstance` also fixes other issues---there's other traits (from the framework and other packages) that rely on the trait booting. I'd rather go with this fix as-is than manually...

Well for one, this allows people to use the new `casts()` method without having to duplicate the array shapes on the method---that's been the cause of quite a few issues...

Unfortunately Github doesn't automatically create links to discussions, but here's another instance where this would solve the problem: https://github.com/larastan/larastan/discussions/2264