Support the ongoing development of Laravel.io →

amirshawn

Joined 31 Mar 2014

Statistics

Threads 2
Replies 1
Solutions 0
Articles 0
posted 10 years ago

Polymorphic relations and hasMany relations for the same record

I'm trying to setup polymorphic relations for the first time. I have 4 models: Category, Image, Tip...

0 Likes
0 Replies
posted 10 years ago

Retreving ID after creating Polymorphic relation

Hi, I'm trying to retrieve an id after creating a Polymorphic relationship. Here is my code: $cat...

0 Likes
1 Replies
replied 10 years ago

Retreving ID after creating Polymorphic relation

Thanks to alxy on IRC who solved this for me. What worked is: $category = Category::whereId($inpu...

0 Likes

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.