Laravel Advanced - Has Many Through Relationship

preview_player
Показать описание
Let's be friends:

Github Repo:
Please read the readme to access the code for the specific video.

Laravel Has One Through Relationship Video:

Laravel Collections Video:

In this video, I have explained the has many through relationship in laravel.
It is an advanced version of has many relationship.

The "has-many-through" relationship provides a convenient shortcut for accessing distant relations via an intermediate relation. For example, a Country model might have many Post models through an intermediate User model. In this example, you could easily gather all blog posts for a given country.
Комментарии
Автор

Thank you very much! It is very helpful, hope you always have a great day! Thanks thanks thanks

raya
Автор

This video is the best I could ever imagined of.

bizhanhejazi
Автор

Thank you so much, this is extremely helpful and informative. I really really liked your videos and teaching techniques. This channel is one of the best on YouTube. 🙂

davidsonzed
Автор

Thank you for video. Can we use this more than 3 tables?

kvanca
Автор

Can you make videos about complex queries in Laravel, both eloquent and query builder a comparison of them? And using closures in queries like the use of anonymous functions.

pyongits
Автор

How can i show users in blade please reply

sportsandstudy
Автор

Thank you for this amazing tutorials! I would like to ask you to make an advanced tutorial with grouping records with goupBy clause. Specificaly how to create a list with articles grouped by year, by month, by week - ierarchicaly. Best regards!

LaravelRo
Автор

i need to fetch users with all posts and active posts in separate, so i have a post function in my user model. is that possible to call post inside with () in laravel ? like user (qry){ qry-> where('isactive', 1)}) ... It returns only one posts, so is there any other options ? Or do i need to create another function for active posts in my model ??

ajaykj
Автор

I have three tables namely: category, subcategory, and services respectively. Now I want relationships between these tables as a category has many subcategories, then each subcategory has many services. so can you help me how to resolve such type of relations for this scenario

deepakagarwal