Menu
About LCS
Eloquent ORM - Relationship
All posts under relationship will go here
A guide on eloquent many to many relationship using pivot table
Suppose a tag has many posts and a post is also associatd with many tags.Hence we can create tag_post table...
Category:
Eloquent ORM
3 years ago
Implementing one to many Polymorphic relationship
Suppose user has many photos and post also has many photos. Hence instead of making two separate tables like photo_users...
Category:
Eloquent ORM
3 years ago
Implementing many to many Polymorphic relationship
Suppose, posts can have many photos then photos can relate to multiple posts also. Same goes for product table. That...
Category:
Eloquent ORM
3 years ago
Using has many through relationship with users, roles and posts table
Suppose user has many posts and post belongs to user. Then role has many users and user belongs to role....
Category:
Eloquent ORM
3 years ago
Querying records with relationship using author, book and rating table
Suppose there are three tables - authors, books and rating. In this post, we will see some example codes of...
Category:
Eloquent ORM
3 years ago
Creating records with relationship using author and book in laravel
In this post we will be creating records using relationship. For the sake of simplicity we will seed data for...
Category:
Eloquent ORM
3 years ago