Skip to main content

Parental by Tighten: Relationship to Self

Premium
4:27

The Full Lesson is Only for Premium Members

Want to access all of our courses? (30 h 33 min)

You also get:

55 courses
Premium tutorials
Access to repositories
Private Discord
Get Premium for $129/year or $29/month

Already a member? Login here

Comments & Discussion

AG
Alex Gower ✓ Link copied!

The pkg docs (https://github.com/calebporzio/parental) says this:

What problem did we just solve?

That is still my question lol. Ill watch again, but is there another example of why this is useful? vs parent_id, nestedset pkg?

PK
Povilas Korop ✓ Link copied!

I guess it's the same as parent_id but with more additional features available right away as methods.

UP
Unisoft Prima ✓ Link copied!

Hi, I have parent model 'Transaction' and child model PurchaseOrder.

I have cast class 'ThousandSeparator'

When I retrieve data using Eloquent $purchaseOrder = PurchaseOrder::withCasts(['total' => \App\Casts\ThousandSeparator::class]);

It simply does not work. However when I use normal model, it works.

Any ideas how to solve it?

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.