Laravel Community Tools by Tighten

Tag "relationships" tricks

27 tricks
Laravel Settings to create your website and model settings in an easy way, you can find all details about the package here: https://github.com/yazan-alnugnugh/laravel-settings
yazan-alnu... 3 years ago 44347
Get products count which are under sub categories of a parent category
Faridbabay... 4 years ago 11384
The main difference is which side of the relationship holds the relationship's foreign key. The model that calls $this->belongsTo() is the owned model in one-to-one and many-to-one relationships and holds the key to the owning model.
sanjok1988 5 years ago 20056
if you want to use ORM eloquent to get a query with the third table and select only particular attributes then here is the trick. Here users can have multiple positions in a company and each user has their own user profile. *note that user_id must be here to fetch data with a specific column. without foreign key eloquent cannot map relational table
sanjok1988 5 years ago 18346
how can access all the posts belongs to a specific tag someone please explain.
Shashank 9 years ago 6509
Relationship in laravel
Darshan Ma... 9 years ago 8449
This is a short video series in two parts about how you can setup different user roles for users in your application using Laravel. It conists of users, roles and user_role tables for this type of relationships between users and their roles. It should all be clearly explained inside of the tutorials. There are ways of improving this functionality and it is really easy to add more roles if needed, build on top of it etc. Hope it will be useful to you and if you have any questions, ask away :) https://www.youtube.com/watch?v=KMR2H6-K36E
Novica89 9 years ago 8110
Hi, I have 3 tables USER, ALBUMS, PHOTOS USER has one to many relation with ALBUMS, ALBUMS has one to many relation with photos. My relation mapping as follows
ajeeeunni 10 years ago 13434
There is easy way to update relation model without query for related model.
monaye 10 years ago 13261